Skip to contents

This function produces a map of the difference in ranks between mean habitat connectivity and habitat availability.

Usage

hci_diff(x, y, global, geoscale, res = reso(), outdir = tempdir())

Arguments

x

SpatRaster.

y

SpatRaster.

global

Logical. Select TRUE if a global analysis is desired, FALSE otherwise. east and west are required when TRUE.

geoscale

Numeric vector. x will be cropped to this extent.

res

Numeric. This parameter refers to the spatial aggregation factor. This value is the number of cells that are grouped when aggregating a raster layer from fine to coarse spatial resolution to reduce computational costs. Setting this parameter to 1 would not aggregate the raster layers. Default is reso().

outdir

Character. Output directory for saving raster in TIFF format. Default is tempdir().

Value

RiskMap. Contains result in the form of SpatRaster objects and file path of the saved maps.

Details

Ideally, the function is tested to yield desired results when length(which(y[] > 0)) > length(which(x[] > 0)).