is.raptor {RAPTOR} | R Documentation |
Testing and preparing input data
Description
Testing if the structure of the input matches the requirements for the RAPTOR functions. The input has to be presented in a data.frame
including the following columns; 1) sample id <as.character
/as.factor
>, 2) tracheid id <as.integer
>, 3) tree-ring year <as.numeric
>, 4) lumen size <as.numeric
>, 5) x-coordinate of the cell <as.numeric
> and 6) y-coordinate of the cell <as.numeric
>. The anatomical data should be oriented with the latewood cells on the upper section of the image. For this function either the order or the columns has to be respected or the following column names have to be present within the data.frame
: "ID" = sample id, "CID" = tracheid id, "YEAR" = year, "CA" = lumen size (micron), "XCAL" = x coordinate, "YCAL" = y coordinate. Additionally, at least 50 tracheid's (or cells) have to be present in each year.
Usage
is.raptor(data, str = TRUE)
Arguments
data |
a |
str |
a logical flag. If |
Details
To prevent errors occurring in the other reported functions, it is advised to run this function for checking the data structure and preparing it for further analyses.
Value
A data.frame
in the appropriate format for other functionalities.
See Also
Examples
#validating example data
input<-example.data(species="LOT_PICEA")
input<-is.raptor(input, str=TRUE)
input