prep_scale.Rd
This function is called by the prep_scale module and scales
the values of a SpatRaster using a method equivalent to terra::scale
prep_scale(covs, logger = NULL)
a list containing the scaled SpatRaster and a dataframe with the parameters used for scaling
covariate_files <- list.files(system.file("extdata", "covariates",
package = "disagapp"), full.names = TRUE)
covariate_list <- lapply(covariate_files, terra::rast)
covariates <- terra::rast(covariate_list)
result <- prep_scale(covs = covariates)
scaled_covariates <- result$covariates