shannon: Calculate Shannon diversity of a vector

View source: R/abundance.R

shannonR Documentation

Calculate Shannon diversity of a vector

Description

Calculate Shannon diversity of a vector

Usage

shannon(x, base = exp(1), standardize = TRUE)

Arguments

x

Vector of counts or proportions

base

Base of logarithm

standardize

If TRUE divide x by sum x

Value

Shannon diversity

Examples

shannon(1:10)
shannon(1:10,base=2)

sherrillmix/dnar documentation built on July 18, 2022, 10:07 p.m.