add_predictors {caretSDM} | R Documentation |
Add predictors to sdm_area
Description
This function includes new predictors to the sdm_area
object.
Usage
add_predictors(sa, pred, variables_selected = NULL, gdal = TRUE)
get_predictors(i)
Arguments
sa |
A |
pred |
|
variables_selected |
|
gdal |
Boolean. Force the use or not of GDAL when available. See details. |
i |
|
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.
Value
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.
Author(s)
Luíz Fernando Esser (luizesser@gmail.com) and Reginaldo Ré. https://luizfesser.wordpress.com
See Also
Examples
# Create sdm_area object:
sa <- sdm_area(parana, cell_size = 25000, crs = 6933)
# Include predictors:
sa <- add_predictors(sa, bioc)
# Retrieve predictors data:
get_predictors(sa)