Skip to contents

Same as sensitivity_analysis() but it takes raster object and other parameters as an input.

  • sa_onrasters() is a wrapper around sean() function. Takes raster object and other parameters as an input.

  • msean_onrast() same as sa_onrasters(). Use this for side effects + results. Produces and plots the maps for the outcomes and results are returned as an object. It produces and plots the maps for the outcomes and results are returned as an object.

Usage

sa_onrasters(rast, link_thresholds = c(0), hd_thresholds = c(0), ...)

msean_onrast(
  global = TRUE,
  geoscale = NULL,
  res = reso(),
  outdir = tempdir(),
  ...
)

Arguments

rast

This is a SpatRaster object that indicates habitat suitability across locations in a landscape. Entry values in this object can include any positive real numbers, but they typically range from 0 to 1. Currently, this argument supports only raster layers in the standard global coordinate reference system -CRS-, that is, WGS 84 or World Geodetic System 1984, identified by the EPSG code 4326. Users need to project the raster layer before providing it as an input in msean() if it is in another CRS.

Numeric vector. Threshold values for link weight. Based on the information on the habitat layer and dispersal kernels, adjacency matrices are created, where entries represent the potential of an organism's movement between habitat locations. Then, the adjacency matrices are converted into graph objects to perform a network analysis, where the entries in the adjacency matrices are now the werights of the links of the network. This parameter supports any positive values, but make sure these values are smaller than the maximum link weight in the network. If link_threshold = 0, all links int he netowkr will be considered in the connectivity analysis. Choosing link weight thresholds greater than zero helps to focus the analysis on the msot likely dispersal connections in the landscape. All link weights that are below this threshold will be replaced with zeros for the connectivity analysis.

hd_thresholds

Numeric vector. host density threshold values

...

Additional parameters to be passed to sean().

global

Logical. TRUE if global analysis, FALSE otherwise. Default is TRUE

geoscale

Numeric vector. This is a set of geographic coordinates in the form of c(Xmin, Xmax, Ymin, Ymax) which correspond to the positions in the standard geographic coordinate system or EPSG:4326. geoscape referst to the geographic extent, or bounding box, for the habitat connectivity analysis. Habitat locations outside the geographic extent will be excluded from the analysis. If geoscale is NuLL, the extent is extracted from rast(SpatRaster) using terra::ext().

res

Numeric. The spatial aggregation factor that will be used to aggregate the raster layer of habitat availability, from fine to coars resolution. Default is reso().

outdir

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

Value

A list of calculated CCRI indices after operations. An index is generated for each combination of paramters. One combination is equivalent to sean() function.

Details

Error not handled for non-overlapping extents.

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

Use get_rasters() to obtain raster object.

msean_onrast()