Calculate mean, variance and difference. The result is produced in form of maps plotted with predefined settings.
Currently, the settings for plot cannot be customized.
Default value is TRUE
for all logical arguments
connectivity(
host,
indices,
global = FALSE,
east = NULL,
west = NULL,
geoscale = NULL,
res = reso(),
pmean = TRUE,
pvar = TRUE,
pdiff = TRUE,
outdir = tempdir()
)
Gmap. See details.
SpatRaster. Host density map aka SpatRaster
object
SpatRaster. Collection of risk indices.
Logical. TRUE
if global analysis is desired, FALSE
otherwise.
east
and west
are required when TRUE
.
SpatRaster. Collection of risk indices on eastern extent.
SpatRaster. Collection of risk indices on western extent.
When TRUE
, geoscale
is ignored. Default is TRUE
.
Vector. geographical scale. Default is NULL
.
Numeric. Map resolution. This value is used in aggregation and dis-aggregation operation.
Default is reso()
.
Logical. TRUE
if map of mean should be plotted, FALSE
otherwise.
Logical. TRUE
if variance map should be plotted, FALSE
otherwise.
Logical. TRUE
if difference map should be plotted, FALSE
otherwise.
Character. Output directory for saving raster in TIFF format.
Default is tempdir()
.
indexes
are actually risk indices i.e. lis of spatRaster
objects
resulting from operations on crop's raster and
parameters provided in either parameters.yaml
or sean()
.
It 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. Rstudio. The maps are plotted using SpatRaster
object.
These objects are available as a return value of this function.
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, tools:::Rd_expr_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
hci_mean()
, hci_variance()
, hci_diff()