For add_predictors the same input sdm_area object is returned including the
pred data binded to the previous grid.
get_predictors retrieves the grid from the i object.
Arguments
sa
A sdm_area object.
pred
RasterStack, SpatRaster, stars or sf object with predictors
data.
variables_selected
character vector with variables names in pred to be used
as predictors. If NULL adds all variables.
gdal
Boolean. Force the use or not of GDAL when available. See details.
i
input_sdm or sdm_area object to retrieve data from.
Author
Luíz Fernando Esser (luizesser@gmail.com) and Reginaldo Ré.
https://luizfesser.wordpress.com
Details
add_predictors returns a sdm_area object with a grid built upon the x parameter.
There are two ways to make the grid and resample the variables in sdm_area: with and
without gdal. As standard, if gdal is available in you machine it will be used (gdal = TRUE),
otherwise sf/stars will be used.