entropy | R Documentation |
Shannon entropy
entropy(S, n = 1)
S |
character of length 1 or longer, contains the sequence |
n |
numeric of length 1, first- or second-order entropy ( |
see also the entropy
function in the entropy
a numeric value
S <- "AABAACA" entropy(S, n = 1) ## Not run: # entropy's version only works with table counts St <- table(unlist(strsplit(S, ""))) entropy::entropy(St, method = "ML" , unit="log2") ## End(Not run) entropy(S, n = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.