shdi: Helper function for calculating diversity

View source: R/diversity.R

shdiR Documentation

Helper function for calculating diversity

Description

Calculating diversity indices such as species richness (s), Shannon's H' (h), Simpson' D (d), Simpson's inverse D (i).

Usage

shdi(df, stand = NULL, species = NULL, abundance = NULL)

Arguments

df

A data.frame, which has three cols: stand, species, abundance. Community matrix should be converted using table2df().

stand, species, abundance

A text to specify each column. If NULL, 1st, 2nd, 3rd column will be used.

Value

A data.frame. Including species richness (s), Shannon's H' (h), Simpson' D (d), Simpson's inverse D (i).

Examples

data(dune, package = "vegan")
df <- table2df(dune)
shdi(df)


ecan documentation built on July 9, 2023, 5:13 p.m.

Related to shdi in ecan...