Description Usage Arguments Details Value References Examples

Margalef's richness index

1 | ```
margalef(x)
``` |

`x` |
A numeric vector of species counts. |

For a vector `x`

of species counts, Margalef's index is

*D = \frac{S -1}{\log N},*

where *S* is the total number of species
observed and *N* is the total number of counts.

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

Equivalent to `margalef()`

in `skbio.diversity.alpha`

.

The value of Margalef's index, *D ≥q 0*. This index is
undefined when the total number of counts is 1 or 0, in which case we
return `NaN`

.

Margalef R. Information theory in ecology. General Systems 3. 1958;36-71.

1 2 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.