powered by
shannon.entropy(p)
numeric
x <- c(1, 1, 1, 1) shannon.entropy(x) x <- c(1, 0, 0, 0) shannon.entropy(x)
Run the code above in your browser using DataLab