Learn R Programming

metricTester (version 1.2.2)

summaries: Return summary statistics from a data frame of randomized metric values

Description

Summarizes observed metric scores. Returns the mean, standard deviation and 95% confidence intervals of each plot or observed richness.

Usage

summaries(null.output, concat.by = "richness")

Arguments

null.output
Data frame of randomized metric values such as an element from a call to reduceRandomizations()
concat.by
Whether to concatenate the randomizations by richness, plot or both

Value

Either a list of or a data frame of summarized metric scores, see details.

Details

Given a data frame of metric values, summarizes either by plot or richness. Outputs the mean, standard deviation and 95% confidence intervals of each plot or observed richness. If provided with concat.by="both", outputs a list of two data frames, one for by richness and one for by plot. Otherwise, outputs a data frame.

References

Miller, E. T., D. R. Farine, and C. H. Trisos. 2015. Phylogenetic community structure metrics and null models: a review with new methods and software. bioRxiv 025726.

Examples

Run this code
#simulate tree with birth-death process
tree <- geiger::sim.bdtree(b=0.1, d=0, stop="taxa", n=50)

sim.abundances <- round(rlnorm(5000, meanlog=2, sdlog=1)) + 1

cdm <- simulateComm(tree, richness.vector=10:25, abundances=sim.abundances)

#below not run for example timing issues on CRAN

#rawResults <- metricsNnulls(tree, cdm)

#results <- reduceRandomizations(rawResults)

#test <- summaries(results$frequency, concat.by="richness")

Run the code above in your browser using DataLab