Calculate the entropy of a vector of probabilities, in bits. Probabilities should sum to one. Probabilities equalling zero will be ignored.
Examples
Entropy(1/2, 0, 1/2) # = 1
#> [1] 1
Entropy(rep(1/4, 4)) # = 2
#> [1] 2
Calculate the entropy of a vector of probabilities, in bits. Probabilities should sum to one. Probabilities equalling zero will be ignored.
Entropy(1/2, 0, 1/2) # = 1
#> [1] 1
Entropy(rep(1/4, 4)) # = 2
#> [1] 2