Learn R Programming

BIOdry (version 0.4)

splitFrame: Multilevel splitting

Description

This function splits a multilevel ecological data series (MEDS) based on the levels of an ecological factor.

Usage

splitFrame(rd, lv = 1)

Arguments

rd
data.frame. Multilevel ecological data series.
lv
Numeric or character. Position number of the ecological factor(s) in the MEDS, or correspondent column name(s), to split the data. If the splitting column is not a factor, the character name of the column should be used.

Value

of data.frame objects.

Details

This function is implemented by ringApply and modelFrame functions to develop multilevel modeling of MEDS.

Examples

Run this code
##Dendrochronological MEDS:
data(Prings05,envir = environment())

## split the MEDS by levels contained in its second ecological
## factor:
spl <- splitFrame(Prings05,2)
str(spl)
## split the data by levels defined in the 'year' factor:
spl <- splitFrame(Prings05,'year')
str(spl)

Run the code above in your browser using DataLab