Homogenize NA values across a set of predictors.
Source:R/utils-predictors.R
predictor_homogenize_na.Rd
This 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
SpatRaster
object with the predictors.- fill
A
logical
value indicating whether missing data are to be filled (Default:FALSE
).- fill_method
A
character
of the method for filling gaps to be used (Default:'ngb'
).- return_na_cells
A
logical
value 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.