shannon_proportion_index | R Documentation |
Compute the Shannon index from a table of contributions
shannon_proportion_index(x, base = exp(1), offset = c(1e-05, NA)[1])
x |
table or matrix of observations. If a matrix then, like a table, columns are variables and rows are records. |
base |
numeric, the base of the logarithm |
offset |
numeric, a small value to prevent taking the log of zero. If |
vector of Shannon index - one element for each record
Wikipedia entry
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.