Description Usage Arguments Details Value References Examples
View source: R/abundanceVector.r
Given a community data matrix of sites by species, extract the column-wise sums (the total number of individuals of each species) and expand to create a regional abundance vector.
1 | abundanceVector(picante.cdm)
|
picante.cdm |
Community data matrix in picante format |
Simple function to create a regional abundance vector given a "regional" community data matrix.
A character vector in the form "s1, s1, s1, s2, s2, s3, etc".
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 7 8 | #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)
abund <- abundanceVector(cdm)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.