sim.sad {BAT}R Documentation

Simulation of species abundance distributions (SAD).

Description

Creates artificial communities following given SADs.

Usage

sim.sad(n, s, sad = "lognormal", sd = 1)

Arguments

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.

Details

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.

Value

A matrix of species x abundance per species.

Examples

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))

[Package BAT version 2.9.6 Index]