range_size {phyloraster} | R Documentation |
Calculate range size for a set of species using a raster as input
Description
This function calculate range size in square meters (by default) for all cells that are not NA. The size of the cells is constant in degrees but not in square meters, which was considered in the method applied to calculate the area.
Usage
range_size(x, cellSz, unit = "m", ...)
Arguments
x |
SpatRaster. A SpatRaster containing presence-absence data (0 or 1) for a set of species. The layers (species) will be sorted according to the tree order. See the phylo.pres function. |
cellSz |
SpatRaster. A SpatRaster containing cellSize values.
See |
unit |
character. One of "m", "km", or "ha" |
... |
additional arguments to be passed passed down from a calling function. |
Value
vector
Author(s)
Gabriela Alves Ferreira and Neander Marcel Heming
Examples
x <- terra::rast(system.file("extdata", "rast.presab.tif",
package="phyloraster"))
range_size(x[[1:2]], cellSz <- terra::cellSize(x))
[Package phyloraster version 2.1.0 Index]