hull.build | R Documentation |
Builds convex hull hypervolumes for each community from incidence and trait data.
hull.build(comm, trait)
comm |
A sites x species matrix, data.frame or vector, with incidence data about the species in the community. |
trait |
A trait matrix, often resulting from hyper.build. |
A 'convhulln' object or a list, representing the hypervolumes of each community.
comm = rbind(c(1,3,0,5,3), c(3,2,5,0,0))
colnames(comm) = c("SpA", "SpB", "SpC", "SpD", "SpE")
rownames(comm) = c("Site 1", "Site 2")
trait = data.frame(body = c(1,2,3,4,4), beak = c(1,5,4,1,2))
rownames(trait) = colnames(comm)
distance = gower(trait)
trait = hyper.build(distance)
hv = hull.build(comm[1,], trait)
plot(hv)
hvlist = hull.build(comm, trait)
plot(hvlist[[1]])
plot(hvlist[[2]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.