Shannon.character: Shannon Entropy of a vector of individuals

View source: R/entropart.R

Shannon.characterR Documentation

Shannon Entropy of a vector of individuals

Description

Calculates the Shannon entropy of a vector of individuals.

Usage

## S3 method for class 'character'
Shannon(NorP, Correction = "Best", ..., CheckArguments = TRUE)

Arguments

NorP

A vector of characters.

Correction

A string containing one of the possible corrections: see Shannon.

...

Further arguments passed to entropart::Tsallis, entropart::Diversity, entropart::Richness, entropart::Shannon or entropart::Simpson (S3 methods for class 'AbdVector' or 'numeric')

CheckArguments

If TRUE (default), the function arguments are verified. Should be set to FALSE to save time in simulations for example, when the arguments have been checked elsewhere.

Value

A named number equal to the calculated entropy. The name is that of the bias correction used.

Examples

SpeciesList <- as.character(Paracou6$marks$PointType)
Shannon(SpeciesList)


EricMarcon/SpatDiv documentation built on May 25, 2023, 12:54 p.m.