shiftFrame: MEDS formatting

Description Usage Arguments Details Value Author(s) Examples

Description

Ring-data frames (e.g. dplR chronologies) are formatted into multilevel ecological data series (or vice versa).

Usage

1
2
shiftFrame(rd, lev.nm = c("plot", "tree", "sample"), which.x = NULL, 
    un = NULL)

Arguments

rd

data.frame. Ring-data frame (see details), or multilevel ecological data series (MEDS).

lev.nm

for the case of ring-data frames, character vector with names of the factor-level columns in the final MEDS, beginning with name of the highest level column and ending with name of the lowest level column. If rd is a MEDS then this argument is ignored.

which.x

for the case of MEDS, character name of the column to be reshaped into a ring-data frame. If NULL then the first numeric column is processed. If rd is a ring-data frame then this argument is ignored.

un

NULL, one, or two character names of SI units to record/transform the processed variables. One character records metric system; two characters with the form c(initial, final) change SI units in the processed data. Defined SI units are micrometers 'mmm', milimeters 'mm', centimeters 'cm', decimeters 'dm', or meters 'm'. If NULL then no metric system is recorded.

Details

Correct formatting of ring-data frames requires their row names to be time-units labels (e.g. years). The column names should be dot-separated labels representing the hierarchy of ecological factors, where the higher levels are defined first and the lower levels after. For example, code 'P16106.17' is the column name of tree '17' in plot 'P16106'. SI units of the processed chronologies can also be changed.

Value

If rd is a ring-data frame then output is a MEDS. If rd is a MEDS then the output is a ring-data frame (see details).

Author(s)

Wilson Lara <wilarhen@gmail.com>, Felipe Bravo <fbravo@pvs.uva.es>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
##tree-ring MEDS:
data(Prings05,envir = environment())

## Formatting the MEDS into a ring-data frame:
pwide <- shiftFrame(Prings05)
str(pwide)
## Formatting the ring-data frame into a MEDS, and changing SI
## units of the rings from milimeters to micrometers:
plong <- shiftFrame(pwide,un = c('mm','mmm'))
str(plong)


Search within the BIOdry package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.