Description Usage Arguments Details Value References Examples
Given a phylo object, a vector of desired species richnesses, and a vector of potential species abundances, will generate a community data matrix with these characteristics.
1 | simulateComm(tree, richness.vector, abundances)
|
tree |
Phylo object |
richness.vector |
Vector of desired species richness, one for each desired plot |
abundances |
A vector of potential abundances, e.g. a log-normal distribution |
There is currently no implementation to control the frequency with which a given species is selected. As of metricTester 1.2.2, this function no longer can occasionally return a CDM missing species that are in the input phylogeny.
A community data matrix (as a data frame) with species as columns and sites as rows.
Miller, E. T., D. R. Farine, and C. H. Trisos. 2016. Phylogenetic community structure metrics and null models: a review with new methods and software. Ecography DOI: 10.1111/ecog.02070
1 2 3 4 5 6 | #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)
|
Loading required package: ape
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.