getSumStats | R Documentation |
Applies different summary statistics functions to 'roleExperiment', 'roleModel', or 'roleData' objects.
getSumStats(x, funs = .getDefaultSumStatsFuns(), moreArgs, ...)
## S4 method for signature 'roleData'
getSumStats(x, funs, moreArgs)
## S4 method for signature 'roleModel'
getSumStats(x, funs, moreArgs)
## S4 method for signature 'roleExperiment'
getSumStats(x, funs, moreArgs)
x |
The object to calculate summary statistics on. |
funs |
A named list of functions to calculate the summary statistics; can be a named list with a single function or many functions, but must be a named list of functions. If unspecified, defaults to including several standard stats. Included diversity index functions in roleR are: 'hillAbund', 'hillGenetic','hillPhylo' & 'richness'. Included raw stats functions are 'rawAbundance', 'rawSpAbundance','rawSppId','rawTraits','rawGenDiv','rawSeqs', 'rawBranchLengths' & 'rawApePhylo'. |
moreArgs |
An optional named list of additional arguments to pass to the functions listed in 'funs'. If given, list names must match those in 'funs'. Note: not all names in 'funs' need to appear in 'moreArgs' |
... |
ignored |
Users can define their own functions, so long as they work on any object of class 'roleData'.
data.frame containing summary stats where each row is a model snapshot and each column is a summary stat requested by a function provided to 'funs'
# get the species richness
# rich_stat <- getSumStats(model, funs = list(rich = richness))
# get many default summary stats
# stats <- getSumStats(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.