is.raptor: Testing and preparing input data

Description Usage Arguments Details Value See Also Examples

View source: R/is.raptor.R

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

1

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

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

the-Hull/raptor documentation built on Nov. 29, 2020, 10:20 p.m.