entropy | R Documentation |
This function calculates the Shannon entropy of a numeric vector.
entropy(x)
x |
A numeric vector containing the values for which entropy will be computed. |
A numeric value representing the entropy.
library(pliman)
x <- c(1, 2, 2, 3, 3, 3, 4, 4, 4, 4)
entropy(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.