predict {predicts} | R Documentation |
Spatial model predictions
Description
Make predictions with models defined in the predicts
package
Usage
## S4 method for signature 'envelope_model'
predict(object, x, tails=NULL, extent=NULL, filename="", ...)
## S4 method for signature 'maxent_model'
predict(object, x, args="", extent=NULL, filename="", ...)
Arguments
object |
model defined in this package (e.g. "envelope_model" and "maxent_model") |
x |
data to predict to. Either a data.frame or a SpatRaster |
tails |
character. You can use this to ignore the left or right tail of the percentile distribution for a variable. If supplied, tails should be a character vector with a length equal to the number of variables used in the model. Valid values are "both" (the default), "low" and "high". For example, if you have a variable x with an observed distribution between 10 and 20 and you are predicting the bioclim value for a value of 25, the default result would be zero (outside of all observed values); but if you use tail='low', the high (right) tail is ignored and the value returned will be 1. |
args |
Pass *prediction* arguments (options) to the maxent software. See |
extent |
SpatExtent that can be supplied to limit the prediction to a sub-region of |
filename |
character. Output filename |
... |
additional arguments for writing files as in |
Value
SpatRaster or vector (if x
is a data.frame).
See Also
predict
function in the "terra" package for spatial predictions with glm, randomForest, etc.