kernel.hotspots: Hotspots in hypervolumes.

View source: R/BAT.R

kernel.hotspotsR Documentation

Hotspots in hypervolumes.

Description

Identify hotspots in kernel density hypervolumes based on minimum volume needed to cover a given proportion of random points.

Usage

kernel.hotspots(comm, prop = 0.5)

Arguments

comm

A 'Hypervolume' or 'HypervolumeList' object, preferably built using function kernel.build.

prop

Proportion of random points to be included.

Details

Estimates the hotspots of one or more communities using kernel density hypervolumes as in Carmona et al. (2021).

Value

A 'Hypervolume' or 'HypervolumeList' with the hotspots of each site.

References

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

Examples

## 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)

BAT documentation built on May 29, 2024, 7:35 a.m.

Related to kernel.hotspots in BAT...