# NOT RUN {
comm <- rbind(c(0,3,2,1), c(1,5,6,2), c(0,0,2,1))
rownames(comm) <- c("Community_1","Community_2","Community_3")
colnames(comm) <- c("Sp_1","Sp_2","Sp_3","Sp_4")
trait <- cbind(c(2.2,4.4,6.1,8.3),c(0.5,1,0.5,0.4),c(0.7,1.2,0.5,0.4))
rownames(trait) <- c("Sp_1","Sp_2","Sp_3","Sp_4")
colnames(trait) <- c("Trait_1","Trait_2","Trait_3")
#Example with community and trait matrices as input data
#kernel.alpha(comm = comm, trait = trait, method = "box", return.hv = FALSE)
#Example with community and trait matrices as input data and abundance data
#kernel.alpha(comm = comm, trait = trait, method = "box", abund = TRUE, return.hv = FALSE)
#Example with hypervolume as input data
#kernel.alpha(comm = hypervolume_box(trait[comm[1,]==1,], name="Community_1"))
#Example with hypervolumeList as input data
#hv1 <- hypervolume_box(trait[comm[1,]==1,],name="Community_1")
#hv2 <- hypervolume_box(trait[comm[2,]==1,],name="Community_2")
#hv3 <- hypervolume_box(trait[comm[3,]==1,],name="Community_3")
#hvlist <- hypervolume_join(hv1, hv2, hv3)
#kernel.alpha(hvlist)
# }
Run the code above in your browser using DataLab