4 ms·R: entropy <- function(x) -sum(p(x)*log(p(x)))by ulvund 17y agoR: entropy <- function(x) -sum(p(x)*log(p(x)))