Calculates Shannon-Weiner entropy

shannon_weiner(l, .prob_bool = FALSE, units = exp(1))

Arguments

l

a list of values numeric or factor

.prob_bool

if TRUE, l is understood as a list of probabilities, if FALSE l is understood as a factor

units

units of the logarithm in the calculation of entropy

Value

Shannon-Weiner entropy