# NOT RUN {
x <- c(15, 6, 4, 0, 3, 0)
shannon(x)
# Using a different base is the same as dividing by the log of that base
shannon(x, base = 10)
shannon(x) / log(10)
brillouin_d(x)
# Brillouin index should be almost identical to Shannon index for large N
brillouin_d(10000 * x)
shannon(10000 * x)
heip_e(x)
(exp(shannon(x)) - 1) / (richness(x) - 1)
pielou_e(x)
shannon(x) / log(richness(x))
# }
Run the code above in your browser using DataLab