align: Data alignment

Description Usage Arguments Details Value Examples

View source: R/align.R


Provides a re-aligned is.raptor file, where new x- and y-coordinates (XCAL and YCAL values, respectively) are calculated according to a specified rotation. Appropriate alignment is achieved when the first row of earlywood cells are positioned along an approximately horizontal axis and the radial files of tracheids are positioned along a vertical axis.


align(input, year = FALSE, list = FALSE, interact = TRUE, make.plot = TRUE)



an is.raptor file.


a numeric vector specifying the year of interest. The default (FALSE) applies the function on all years present in the input.


a vector of numeric values indicating the rotation slope for each year.


a logical flag. If TRUE, the user can manually assign the degree of rotation for each annual ring in an interactive session. The user will have to select among the options (along the horizontal axis, along the vertical axis, manually define the degree of reorientation based on a set of slopes overlaid on the plot). If FALSE, the rotation is optimized automatically using a simple linear regression through all points along the horizontal axis (default = FALSE).


logical flag indicating whether to make a plot (default = FALSE).


Correct alignment of cells/tracheids is important for detecting the first cells and assigning cells to a radial file. This function provides the option to align your cell data (XCAL and YCAL). This function provides and interactive procedure to improve the alignment by presenting a crosshair with slopes with which the sample should be rotated. Proper alignment is obtain when the first cells are approximately aligned on a horizontal line and the upward cells are propagated vertically. Either interactively or with predefined slopes, the user can rotate the sample orientation. An automatic option is also available where a simple linear regression is fitted through all points to adjust the rotation. The plot shows the original position of the cells (black dots) and lines that can be selected to rotate the sample. After correction the new position of the cells is presented (red dots).


An aligned is.raptor file.


#rotating example data
input<-is.raptor("LOT_PICEA"), str=FALSE)
input<-align(input, year=2007, list=FALSE,interact=FALSE, make.plot=TRUE)

RAPTOR documentation built on March 13, 2020, 3:02 a.m.

Related to align in RAPTOR...