comm1 <- matrix(c(1,1,0,2,4,0,0,1,2,0,0,3), nrow = 4, ncol = 3, byrow = TRUE)
comm2 <- matrix(c(2,2,0,3,1,0,0,0,5,0,0,2), nrow = 4, ncol = 3, byrow = TRUE)
comm3 <- matrix(c(2,0,0,3,1,0,0,0,5,0,0,2), nrow = 4, ncol = 3, byrow = TRUE)
comm <- array(c(comm1, comm2, comm3), c(4,3,3))
colnames(comm) <- c("sp1","sp2","sp3")
tree <- tree.build(gower(1:3))
tree$tip.label <- colnames(comm)
methods <- data.frame(method = c("Met1","Met2","Met3"), nSamples = c(1,2,1))
optim.beta.stats(comm,,methods, c(1,2,1)) #a complete sample will have 0 difference
optim.beta.stats(comm, tree, methods = methods, samples = c(0,1,1), runs = 100)
Run the code above in your browser using DataLab