Learn R Programming

BIOdry (version 0.9.1)

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> [aut, cre] (<https://orcid.org/0000-0003-3527-1380>), Felipe Bravo <fbravo@pvs.uva.es> [aut] (<https://orcid.org/0000-0001-7348-6695>)

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