comm <- matrix(c(0,0,1,1,0,0,2,1,0,0), nrow = 2, ncol = 5, byrow = TRUE)
trait = 1:5
tree <- hclust(dist(c(1:5), method = "euclidean"), method = "average")
alpha(comm)
gamma(comm)
gamma(comm, trait)
gamma(comm, tree)
Run the code above in your browser using DataLab