robust_transformation: Transform raster to PRIO-GRID format

View source: R/utility.R

robust_transformationR Documentation

Transform raster to PRIO-GRID format

Description

This should generally not be used. Write exactly what you need to transform the data instead. It can be used as a general template for how to transform data, however.

Usage

robust_transformation(r, agg_fun, disagg_method = "near", cores = 1, ...)

Arguments

r

Raster to transform

agg_fun

Aggregation function, see terra::aggregate

disagg_method

Disaggregation method, see terra::disagg

cores

The number of cores to use when aggregating data

Value

SpatRaster

Examples

r <- prio_blank_grid(ncol = 1440, nrow = 720)
r <- project(r, "ESRI:54009")
robust_transformation(r, agg_fun = "mean")

prio-data/priogrid documentation built on June 14, 2025, 11:06 p.m.