Learn R Programming

benthos (version 2.0-0)

margalef: Margalef Index of Diversity

Description

Margalef Index of Diversity is given by $$D = \frac{S-1}{\ln(N)}$$

Usage

margalef(taxon, count)

Value

Margalef diversity index (numeric

vector of length 1)

Arguments

taxon

taxa names (character)

count

counts (numeric)

Details

For \(N=1\), the index is set to 0.

Examples

Run this code
margalef(
    taxon = c("Euspira pulchella", "Nephtys cirrosa"),
    count = c(4, 6)
)

Run the code above in your browser using DataLab