Package 'tgram'

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

Help Index


Traqueid Measurements in Juniperus thurifera

Description

An example of traqueid measurements to standarize with function tgram.

Usage

data(juniperus)

Format

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

Examples

data(juniperus)
cosa <- with(juniperus, 
                  standz.all(traq=width.um, series=traqueidogram,
                                 wl=lumen.wall, w.char="w", G=20)
                  ) 

plot(cosa, type="l")

Vaganov Normalized Tracheidogram

Description

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).

Usage

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,...)

Arguments

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 wl to indicate "wall".

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 standz.all resulting from applying the standz.all function.

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 link{plot}.

Value

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 data.stdz are "wall" tracheidograms.

which.l

Vector indicating which rows in data.stdz are "lumen" tracheidograms.

Author(s)

Marcelino de la Cruz Rot and Lucia DeSoto

References

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.

Examples

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)

Compute Tracheidograms

Description

Function to compute tracheidograms from microscopic measurements.

Usage

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, ...)

Arguments

traq

microscopic light profile. A vector with the light measurements or a data.frame or matrix with two columns. In this case, the first column contains pixel order (i.e. position along the x axis) and the second one contains the light (i.e. "y") lectures.

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 tgram function.

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.

Details

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.

Value

tgram returns an object of class tgram, bassically a list with

traq

original data.

traq0

if traq was a 2 column matrix, then traq0 returns the same object. If traq was a vector, traq0 returns a two column matrix (first column with pixel position and second with ligh lectures).

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.

Author(s)

Marcelino de la Cruz Rot and Lucia DeSoto

References

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.

Examples

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")

Light Throughout a Microscopic Section of Juniperus Wood

Description

A measurement of light intensity troughout a sequence of pixels in a microscopic section of Juniperus thurifera wood.

Usage

data(traq.profile)

Format

A data frame with 883 observations on the following 2 variables.

X1

Pixel position in the sequence

Y1

Light intensity

Examples

data(traq.profile)
tgram(traq.profile, mw=10)