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 data.frame where tracheids are ordered in rows and the columns contain the variables; sample id, cell id, year, tracheid lumen area, x coordinates and y coordinates. The name of the columns (colnames) have to either be named as "ID","CID","YEAR","CA","XCAL" and "YCAL" or properly ordered.

str

a logical flag. If TRUE the structure of the data will be printed (default = FALSE).

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

anatomy.data

Examples

#validating example data
input<-example.data(species="LOT_PICEA")
input<-is.raptor(input, str=TRUE)
input

[Package RAPTOR version 1.0.1 Index]