# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest
# and their taxonomy)
data(Paracou618)
# Ps is the vector of probabilities
Ps <- Paracou618.MC$Ps
# Calculate the phylogenetic Shannon diversity of the plot
AllenH(Paracou618.MC$Ps, 1, Paracou618.Taxonomy, Normalize=TRUE) -> Allen
Allen
# Calculate it using PhyloEntropy: more powerful but much slower is the tree has many periods
PhyloEntropy(Paracou618.MC$Ps, 1, Paracou618.Taxonomy, Normalize=TRUE) -> phyE
summary(phyE)
Run the code above in your browser using DataLab