sim.sad | R Documentation |
Creates artificial communities following given SADs.
sim.sad(n, s, sad = "lognormal", sd = 1)
n |
total number of individuals. |
s |
number of species. |
sad |
The SAD distribution type (lognormal, uniform, broken stick or geometric). Default is lognormal. |
sd |
The standard deviation of lognormal distributions. Default is 1. |
Species Abundance Distributions may take a number of forms. A lognormal SAD probably is the most supported by empirical data, but we include other common types useful for testing multiple algorithms including several of the functions in BAT.
A matrix of species x abundance per species.
comm1 <- sim.sad(10000, 100)
comm2 <- sim.sad(10000, 100, sd = 2)
comm3 <- sim.sad(10000, 100, sad = "uniform")
par(mfrow=c(1,3))
hist(log(comm1$Freq))
hist(log(comm2$Freq))
hist(log(comm3$Freq))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.