shannon: Computes Shannon's and equitability indices
Description
Computes Shannon's and equitability indices
Usage
shannon(vect, base=2)
Value
A vector of two values: Shannon's and equitability indices. The base logarithm used is stored as attribute
Arguments
vect
a probability vector whose sum = 1 or a frequency vector
base
logarithm base used (default=2)
Details
Computes Shannon's and equitability indices. The vector passed can be a probability vector whose sum equal 1 or a vector of frequencies (e.g. the number of food item of each category).