View source: R/generateAbundances.R
generateAbundances | R Documentation |
Generate a vector of taxon abundances.
generateAbundances(N, count = 1000, mode = 1, k = 0.5, probabs = FALSE)
N |
number of species |
count |
total number of individuals (ignored in mode 2, 4 and 7) |
mode |
1=each species receives round(count/N) counts, 2=sampled from uniform distribution with 0 as lower and count as upper bound, 3=dominant species takes 95 percent of the counts and all others split the remaining counts equally, 4=counts are sampled from a Poisson distribution with lambda set to count/N, 5=using bstick function from vegan, 6=using geometric series with parameter k, 7=sample from the exponential distribution and scale with count/N |
k |
evenness parameter of geometric series (the smaller, the more even is the abundance vector) |
probabs |
if true, return probabilities instead of abundances |
The taxon abundance vector can be used as initial abundance vector in models. Note: The geometric series (a niche apportionment model) is for instance described in "Comments about some species abundance patterns: classic, neutral, and niche partitioning models" by Ferreira and Petrere-Jr., Braz. J. Biol. 2008
species abundances
simCountMat
x <- round(generateAbundances(10, mode=6))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.