margalef: Margalef Index of Diversity

View source: R/indicators.R

margalefR Documentation

Margalef Index of Diversity

Description

Margalef Index of Diversity is given by

D = (S-1)/ln(N)

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

Usage

margalef(.data = NULL, taxon, count)

margalef_(.data = NULL, taxon, count)

Arguments

.data

data in a data.frame, tibble, data.table, database etc.

taxon

taxa names (character)

count

counts (numeric)

Value

Margalef diversity index (numeric vector of length 1)

Functions

  • margalef_(): version suitable for calling from a function (see package lazyeval).

Examples

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

benthos documentation built on Aug. 22, 2022, 5:07 p.m.