raster.evenness | R Documentation |
Regularity of distance and abundance between any two species in a community using rasters of species distributions (presence/absence or abundance).
raster.evenness(
layers,
tree,
distance,
method = "expected",
func = "camargo",
abund = TRUE
)
layers |
A SpatRaster object of species distributions from package terra. |
tree |
A phylo or hclust object or alternatively a species x traits matrix or data.frame to build a functional tree. |
distance |
A dist object representing the phylogenetic or functional distance between species. |
method |
Calculate dispersion using "expected" values (default) or values based on "contribution" of species to the tree. |
func |
Calculate dispersion using "Camargo" (1993; default) or "Bulla" (1994) index. |
abund |
A boolean (T/F) indicating whether evenness should be calculated using abundance data. |
If no tree or distance is provided the result is the original index of Bulla with correction. Note that cells with less than two species cannot have evenness values.
A SpatRaster object representing evenness in space.
Bulla, L. (1994) An index of evenness and its associated diversity measure. Oikos, 70: 167-171.
Camargo, J.A. (1993) Must dominance increase with the number of subordinate species in competitive interactions? Journal of Theoretical Biology, 161: 537-542.
sp1 <- terra::rast(matrix(c(NA,1,1,1,1,0,0,0,0), nrow = 3, ncol = 3, byrow = TRUE))
sp2 <- terra::rast(matrix(c(0,0,0,0,1,1,1,1,1), nrow = 3, ncol = 3, byrow = TRUE))
sp3 <- terra::rast(matrix(c(0,0,0,1,1,1,0,0,0), nrow = 3, ncol = 3, byrow = TRUE))
spp <- c(sp1, sp2, sp3)
tree <- hclust(dist(c(1:3), method="euclidean"), method="average")
tree$labels = c("Sp1", "Sp2", "Sp3")
names(spp) = tree$labels
raster.evenness(spp)
raster.evenness(spp, tree)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.