shannon | R Documentation |
Compute entropy according to Shannon (1948)
shannon(.data = NULL, taxon, count, base = 2) shannon_(.data = NULL, taxon, count, base = 2)
.data |
data in a |
taxon |
taxa names ( |
count |
counts ( |
base |
the base with respect to which logarithms are computed. Defaults to 2 (unit: bits). |
Shannon's entropy
shannon_()
: version suitable for calling from a function
(see package lazyeval).
Shannon, C. E., 1948. A Mathematical Theory of Communication. Bell System Technical Journal 27: 379-423.
shannon( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.