richness: Species Richness

View source: R/richness.R

richnessR Documentation

Species Richness

Description

Compute species richness from occupancy probabilities.

Usage

richness(psi)

Arguments

psi

Numeric vector or matrix of occupancy probabilities. If vector, then species richness is computed for the vector of probabilities (and a scalar is returned). If matrix, then species richness is computed independently for each record (and a vector is returned).

Details

Calculates species richness from occupancy probabilities. Given a vector of species occupancy probabilities, computes the expected number of species as the sum of the probabilities. If given a matrix of species occupancy probabilities (where each record represents a community), computes the expected number of species as the row sums.

Value

Numeric scalar or vector of species richness values.

See Also

diversity for computing Hill diversity from proportional abundances.

dissimilarity for computing Bray-Curtis dissimilarity from proportional abundances.

Examples

# Compute species richness.
richness(psi=c(0.506,0.825,0.135,0.683))

LocaTT documentation built on June 14, 2026, 1:06 a.m.