Skip to contents

This function produces a map of difference b/w mean and sum indexes in rank of cropland harvested area fraction.

Usage

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

Arguments

x

SpatRaster.

y

SpatRaster.

global

Logical. TRUE if 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. Map resolution. This value is used in aggregation and dis-aggregation operation. 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)).