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")
methods <- data.frame(method = c("Met1","Met2","Met3"),
nSamples = c(1,2,1), fixcost = c(1,1,2), varCost = c(1,1,1))
tree <- hclust(dist(c(1:3), method="euclidean"), method="average")
tree$labels <- colnames(comm)
if (FALSE) {
optim.beta(comm,,methods)
optim.beta(comm,,methods, seq = TRUE)
optim.beta(comm, tree, methods)
optim.alpha(comm,, methods = methods, seq = TRUE, base = c(0,1,1))
}
Run the code above in your browser using DataLab