kernel.hotspots | R Documentation |
Identify hotspots in kernel density hypervolumes based on minimum volume needed to cover a given proportion of random points.
kernel.hotspots(comm, prop = 0.5)
comm |
A 'Hypervolume' or 'HypervolumeList' object, preferably built using function kernel.build. |
prop |
Proportion of random points to be included. |
Estimates the hotspots of one or more communities using kernel density hypervolumes as in Carmona et al. (2021).
A 'Hypervolume' or 'HypervolumeList' with the hotspots of each site.
Carmona, C.P., et al. (2021) Erosion of global functional diversity across the tree of life. Science Advances, 7: eabf2675. DOI: 10.1126/sciadv.abf2675
## Not run:
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)
hv = kernel.build(comm[1,], trait)
plot(hv)
kernel.alpha(hv)
hot = kernel.hotspots(hv, 0.5)
plot(hot)
kernel.alpha(hot)
hvlist = kernel.build(comm, trait)
hot = kernel.hotspots(hvlist, 0.1)
kernel.alpha(hot)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.