try_SAD: Relative abundances, given richness and distributional...

View source: R/uniroot_gamma_and_lnorm.R

try_SADR Documentation

Relative abundances, given richness and distributional assumption

Description

Wrapper for qgamma, qinvgamma, and qlnorm that takes the number of species and a shape parameter and gives relative abundance estimates for each species.

Usage

try_SAD(rich, x, distr)

Arguments

rich

Integer, the total number of species in the species abundance distribution.

x

Non-negative scalar, the shape parameter for a gamma distribution.

distr

Character string, one of c("lnorm", "gamma")

See Also

qgamma, qlnorm, fit_SAD, qinvgamma

Examples

try_SAD(rich = 10, x = 0.2, distr = "lnorm")
try_SAD(rich = 10, x = 2, distr = "lnorm")

try_SAD(rich = 10, x = 0.2, distr = "gamma")
try_SAD(rich = 10, x = 2, distr = "gamma")

## Not run:  try_SAD(rich = 10, x = -1, distr = "lnorm")
try_SAD(rich = 10, x = -1, distr = "gamma")
try_SAD(rich = 10, x = 0, distr = "gamma")

## End(Not run)


mikeroswell/MeanRarity documentation built on May 5, 2024, 4:50 p.m.