Title: | Compute and Plot Tracheidograms |
---|---|
Description: | Functions to compute and plot tracheidograms, as in De Soto et al. (2011) <doi:10.1139/x11-045>. |
Authors: | Marcelino de la Cruz and Lucia DeSoto |
Maintainer: | Marcelino de la Cruz <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.2-3 |
Built: | 2024-12-17 06:31:20 UTC |
Source: | CRAN |
An example of traqueid measurements to standarize with function tgram
.
data(juniperus)
data(juniperus)
A data frame with 77 observations on the following 4 variables.
traqueidogram
Numeric vector indicating the traqueidogram to which each measurement belongs
lumen.wall
A factor indicating if the measurement is lumen (l
)or wall (w
)
order
Position of the measurement in the ordered sequence within each traqueidogram
width.um
Width (micrometres) of each measurement
data(juniperus) cosa <- with(juniperus, standz.all(traq=width.um, series=traqueidogram, wl=lumen.wall, w.char="w", G=20) ) plot(cosa, type="l")
data(juniperus) cosa <- with(juniperus, standz.all(traq=width.um, series=traqueidogram, wl=lumen.wall, w.char="w", G=20) ) plot(cosa, type="l")
The function produces a normalized tracheidogram, i.e. a curve showing variations in cell parameters as a function of the cell position within an annual ring, following the procedure of Vaganov (1990).
standz.all(traq, series, wl = NULL, w.char = NULL, order = NULL, G = 30) standz(tgl1, G=30) ## S3 method for class 'standz.all' plot(x, which=NULL,...)
standz.all(traq, series, wl = NULL, w.char = NULL, order = NULL, G = 30) standz(tgl1, G=30) ## S3 method for class 'standz.all' plot(x, which=NULL,...)
traq |
A vector with the ordered sequences of measurements for each tracheidogram. |
series |
A vector of indicator values (i.e. a factor) with each level indicating each unique tracheidogram. |
wl |
A vector indicating if the measurement is wall or lumen. |
w.char |
Character used in |
order |
Vector indicating the ordering of each measurement in each lumen or wall series within a tracheidogram. |
G |
Number of cells to get the original measurements normalized to. |
tgl1 |
Vector with the ordered sequences of measurements of a single tracheidogram. |
x |
An object of class |
which |
One of NULL, "w", or any other character. This produces the plot function to draw all the tracheidograms together, only the "wall" traqueidograms or only the "lumen" ones, respectively. |
... |
Additional graphical parameters passed to |
standz
returns a vector of length G with the normalized values.
standz.all
returns an object of class standz.all
. Basically a list with the following elements:
data.stdz |
A matrix with G columns and as many rows as unique wall and lumen tracheidograms were in the original data, each with the normalized values of each tracheidogram. |
which.w |
Vector indicating which rows in |
which.l |
Vector indicating which rows in |
Marcelino de la Cruz Rot and Lucia DeSoto
Vaganov, E.A. 1990. The tracheidogram method in tree-ring analysis and its application. In: Cook E.R., Kairiukstis L.A., eds. Methods of dendrochronology: applications in the environmental sciences . Kluwer Academic Publishers. Dordrecht, the Netherlands. pp. 63-76.
data(juniperus) cosa <- with(juniperus, standz.all(traq=width.um, series=traqueidogram, wl=lumen.wall, w.char="w", G=20) ) plot(cosa, type="l") plot(cosa, type="l", which="w") plot(cosa, type="l", which="l", add=TRUE) standz(with(juniperus,width.um[traqueidogram==1 & lumen.wall =="l"]), G=20) lines(1:20, standz(with(juniperus,width.um[traqueidogram==1 & lumen.wall =="l"]), G=20), lwd=3)
data(juniperus) cosa <- with(juniperus, standz.all(traq=width.um, series=traqueidogram, wl=lumen.wall, w.char="w", G=20) ) plot(cosa, type="l") plot(cosa, type="l", which="w") plot(cosa, type="l", which="l", add=TRUE) standz(with(juniperus,width.um[traqueidogram==1 & lumen.wall =="l"]), G=20) lines(1:20, standz(with(juniperus,width.um[traqueidogram==1 & lumen.wall =="l"]), G=20), lwd=3)
Function to compute tracheidograms from microscopic measurements.
tgram(traq, val50 = 50, xlim = NULL, ylim = NULL, mw = 1, plotit = TRUE) ## S3 method for class 'tgram' plot(x, xlim = NULL, ylim = NULL, colores = c("red", "green"), leyenda = c("lumen", "double wall"), lwd = 2, add = FALSE,traq.0 = TRUE, bg.legend = NULL, ...)
tgram(traq, val50 = 50, xlim = NULL, ylim = NULL, mw = 1, plotit = TRUE) ## S3 method for class 'tgram' plot(x, xlim = NULL, ylim = NULL, colores = c("red", "green"), leyenda = c("lumen", "double wall"), lwd = 2, add = FALSE,traq.0 = TRUE, bg.legend = NULL, ...)
traq |
microscopic light profile. A vector with the light measurements or a |
val50 |
"y-value" at wich measurements should be made. |
mw |
integer. Width of the rolling window to smooth the original data. |
plotit |
logical. should the original data and the computed tracheidogram be drawn? |
xlim |
extent of the x-axis. A vector of length 2. |
ylim |
extent of the y-axis. A vector of length 2. |
x |
an object of class tgram, resulting from |
colores |
a vector of length 2, with the colors to draw the lumen and wall measurements, respectively. |
leyenda |
a vector of length 2 with the legend to appear in the plot. By default leyenda =c("lumen","double wall"). |
lwd |
width of the lines in the legend. |
add |
logical. If TRUE, add to a current plot. |
traq.0 |
logical. If TRUE, draw the original measurements. |
bg.legend |
background color for the legend. |
... |
additional graphical parameters. |
The purpouse of this fucntion is obtaining cell anatomical data from microscopic light measurements (see DeSoto et al. for details of data adquisition). The microscopic lectures are first smoothed with a rolling window (using function rollmean
of package zoo
, using the selected width mw
. Then, the smoothed curve is "cut" at the treshold value val50
and the distances among the intersection points are computed. This provides an ordered sequence of lumen diameters (LD) and double wall thikness (DWT) measurements. From this sequence some other anatomical measurements are computed. Radial cell wall thickness is computed as CWT[t] = 1/2 * (DWT[t]/2 + DWT[t+1]/2) . Tracheid diameter is computed as TD[t] = DWT[t]/2 + LD[t] + DWT[t+1]/2.
tgram returns an object of class tgram, bassically a list with
traq |
original data. |
traq0 |
if |
cut.points |
two column matrix with the coordinates of the intersection of y = val50 and the smoothed curve. |
what |
vector indicating if the computed distances are of lumen (1) or double wall (2) . |
distances |
ordered sequence of the computed distances (both of lumen and double wall). |
LD |
ordered sequence of lumen diameters. |
DWT |
ordered sequence of double wall thickness. |
mw |
width of the rolling window employed to smooth the data. |
CWT |
ordered sequence of radial cell wall thikness'. |
TD |
ordered sequence of tracheid diameters. |
LD_CWT_ratio |
ordered sequence of LD/CWT ratio. |
Marcelino de la Cruz Rot and Lucia DeSoto
DeSoto, L., De la Cruz, M. & Fonti, P. 2011. Intra-annual pattern of tracheid size in the Mediterranean Juniperus thurifera as indicator for seasonal water stress. Canadian Journal of Forest Research 41: 1280-1294.
data(traq.profile) plot(tgram(traq.profile, mw=10),leyenda=c("lumen","double wall"), xlab="distance pixel", ylab="grey value",ylim=c(0,250), bg.legend="white")
data(traq.profile) plot(tgram(traq.profile, mw=10),leyenda=c("lumen","double wall"), xlab="distance pixel", ylab="grey value",ylim=c(0,250), bg.legend="white")
A measurement of light intensity troughout a sequence of pixels in a microscopic section of Juniperus thurifera wood.
data(traq.profile)
data(traq.profile)
A data frame with 883 observations on the following 2 variables.
X1
Pixel position in the sequence
Y1
Light intensity
data(traq.profile) tgram(traq.profile, mw=10)
data(traq.profile) tgram(traq.profile, mw=10)