Learn R Programming

abdiv (version 0.2.0)

menhinick: Menhinick's richness index

Description

Menhinick's richness index

Usage

menhinick(x)

Arguments

x

A numeric vector of species counts.

Value

Menhinick's richness index, \(R > 0\). The index is undefined when the total number of counts is 0, in which case we return NaN.

Details

For a vector x of raw species counts, the Menhinick's richness index is \(\frac{S}{\sqrt{N}}\), where \(N\) is the total number of counts and \(S\) is the total number of species observed.

This index is appropriate only for raw counts, not transformed counts or proportions.

Equivalent to menhinick() in skbio.diversity.alpha.

Examples

Run this code
# NOT RUN {
x <- c(15, 6, 4, 0, 3, 0)
menhinick(x)
# }

Run the code above in your browser using DataLab