connectivity {geohabnet} | R Documentation |
Calculate and plot maps of habitat connectivity
Description
Calculate the mean habitat connectivity across a set of selected parameters, variance in habitat connectivity, and the difference in ranks between mean habitat connectivity and habitat availability. The result is produced in form of maps plotted with predefined graphics settings.
Currently, the settings for plot cannot be customized.
Default value is TRUE
for all logical arguments
Usage
connectivity(
host,
indices,
global = FALSE,
east = NULL,
west = NULL,
geoscale = NULL,
res = reso(),
pmean = TRUE,
pvar = TRUE,
pdiff = TRUE,
outdir = tempdir()
)
Arguments
host |
SpatRaster. A |
indices |
SpatRaster. Collection of risk indices. |
global |
Logical. Select |
east |
SpatRaster. Collection of risk indices on eastern extent. |
west |
SpatRaster. Collection of risk indices on western extent.
When |
geoscale |
Vector. This refers to the geographical extent for the habitat connectivity analysis when |
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 |
pmean |
Logical. |
pvar |
Logical. |
pdiff |
Logical. |
outdir |
Character. Output directory for saving raster in TIFF format.
Default is |
Details
indexes
has a list of spatRaster
objects resulting from the unique combinations of all parameters specified in either parameters.yaml
or sean()
.
For each unique combination of parameters, an index of habitat connectivity is calculated for each location in a landscape.
Then these indices are used to calculate the mean and the variance of habitat connectivity of a location across all specified parameters.
This function will save all the opted plots using - pmean
, pvar
and pdiff
.
File will be saved in provided value of outdir
or tempdir()
. If interactive()
is TRUE
,
then plots can be seen in active plot window (e.g., plot panel in Rstudio). The maps are plotted using SpatRaster
objects.
These SpatRaster
objects are also available as a return value of this function.
Value
Gmap. See details.
References
Yanru Xing, John F Hernandez Nopsa, Kelsey F Andersen, Jorge L Andrade-Piedra, Fenton D Beed, Guy Blomme, Mónica Carvajal-Yepes, Danny L Coyne, Wilmer J Cuellar, Gregory A Forbes, Jan F Kreuze, Jürgen Kroschel, P Lava Kumar, James P Legg, Monica Parker, Elmar Schulte-Geldermann, Kalpana Sharma, Karen A Garrett, Global Cropland connectivity: A Risk Factor for Invasion and Saturation by Emerging Pathogens and Pests, BioScience, Volume 70, Issue 9, September 2020, Pages 744–758, doi:10.1093/biosci/biaa067
Hijmans R (2023). terra: Spatial Data Analysis. R package version 1.7-46, https://CRAN.R-project.org/package=terra
See Also
hci_mean()
, hci_variance()
, hci_diff()