
Homogenize NA values across a set of predictors.
Source:R/utils-predictors.R
predictor_homogenize_na.RdThis method allows the homogenization of missing data across a
set of environmental predictors. It is by default called when predictors
are added to BiodiversityDistribution object. Only grid cells with NAs
that contain values at some raster layers are homogenized. Additional
parameters allow instead of homogenization to fill the missing data with
neighbouring values
Arguments
- env
A
SpatRasterobject with the predictors.- fill
A
logicalvalue indicating whether missing data are to be filled (Default:FALSE).- fill_method
A
characterof the method for filling gaps to be used (Default:'ngb').- return_na_cells
A
logicalvalue of whether the ids of grid cells with NA values is to be returned instead (Default:FALSE).
Value
A SpatRaster object with the same number of layers as the input.