This function is called by the pred_transfer module and can transfer predictions generated from a model to a new area of interest.
pred_transfer(country, fit, meta, covdf = NULL, aggdf = NULL, async = FALSE)character. ISO3 code of the country.
disag_model. Object returned by disag_model function that contains all the necessary objects for generating predictions.
list. The metadata object
dataframe. As produced by fileInput, containing name and
datapath columns of covariates
dataframe. As produced by fileInput, containing name and
datapath columns of the aggregation raster
logical. Whether or not the function is being used asynchronously
a list of SpatRaster objects
common <- readRDS(system.file("extdata", "fit-minimal.rds", package = "disagapp"))
common$fit$data$covariate_rasters <- unwrap_terra(common$fit$data$covariate_rasters)
# transfer to Malawi
transfer <- pred_transfer("MWI", common$fit, common$meta)
#>
|---------|---------|---------|---------|
=========================================