shannon_index | R Documentation |
Compute a Shannon index for diversity of equitability
shannon_index( x, type = c("proportion", "counts")[1], equitability = TRUE, base = exp(1), invert = c(NA, "reciprocal", "one-minus")[1], ... )
x |
table or matrix of observations. If a matrix then, like a table, columns are variables and rows are records. |
type |
character, one of "proportion", "counts", etc. |
equitability |
logical, if TRUE (default) convert diversity to equitability which is just the normalized (0-1) diversity index |
base |
numeric, the base of the logarithm |
invert |
character, if |
... |
arguments for the diversity index function |
vector of diversity index values - one element for each record (row of input)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.