powered by
Compute entropy according to Shannon (1948)
shannon(.data = NULL, taxon, count, base = 2)shannon_(.data = NULL, taxon, count, base = 2)
shannon_(.data = NULL, taxon, count, base = 2)
data in a data.frame, data_frame, data.table, database etc.
data.frame
data_frame
data.table
taxa names (character)
character
counts (numeric)
numeric
the base with respect to which logarithms are computed. Defaults to 2.
Shannon's entropy
shannon_: version suitable for calling from a function (see package lazyeval).
shannon_
Shannon, C. E., 1948. A Mathematical Theory of Communication. Bell System Technical Journal 27: 379-423.
# NOT RUN { shannon( taxon = c("Euspira pulchella", "Nephtys cirrosa"), count = c(4, 6) ) # }
Run the code above in your browser using DataLab