powered by
Calculate the Shannon's entropy.
entropy(x)
numeric. entropy
a numeric vector.
set.seed(123) x <- sample(1:10, 20, replace = TRUE) entropy(x)
Run the code above in your browser using DataLab