Learn R Programming

BIOdry (version 0.9)

levexp: Vector releveling

Description

Expansion or reduction of a numeric vector by matching its level names with the ecological factors of a multilevel ecological data series.

Usage

levexp(x, levels)

Value

numeric vector with expanded/reduced levels.

Arguments

x

numeric vector with names of the vector representing the levels to be matched.

levels

data.frame. Multilevel ecological data series, or character vector of levels.

Author

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

Examples

Run this code
##Multilevel ecological data series of tree-ring widths:
data(Prings05,envir = environment())
## tree radii measured at 2003:
data(Pradii03,envir = environment())    

## Releveling the tree radii
refs <- levexp(Pradii03,Prings05)
refs

Run the code above in your browser using DataLab