Internal S4 method used to predict single models from biomod2_model on (new) explanatory variables. predict2 was introduced to allow a signature with two arguments : object, a type of biomod2_model and newdata, either a SpatRaster or a data.frame.

predict2(object, newdata, ...)

# S4 method for class 'biomod2_model,SpatRaster'
predict2(object, newdata, predfun, seedval = NULL, ...)

# S4 method for class 'biomod2_model,data.frame'
predict2(object, newdata, predfun, seedval = NULL, ...)

# S4 method for class 'ANN_biomod2_model,SpatRaster'
predict2(object, newdata, ...)

# S4 method for class 'ANN_biomod2_model,data.frame'
predict2(object, newdata, ...)

# S4 method for class 'CTA_biomod2_model,SpatRaster'
predict2(object, newdata, ...)

# S4 method for class 'CTA_biomod2_model,data.frame'
predict2(object, newdata, ...)

# S4 method for class 'FDA_biomod2_model,SpatRaster'
predict2(object, newdata, ...)

# S4 method for class 'FDA_biomod2_model,data.frame'
predict2(object, newdata, ...)

# S4 method for class 'GAM_biomod2_model,SpatRaster'
predict2(object, newdata, ...)

# S4 method for class 'GAM_biomod2_model,data.frame'
predict2(object, newdata, ...)

# S4 method for class 'GBM_biomod2_model,SpatRaster'
predict2(object, newdata, ...)

# S4 method for class 'GBM_biomod2_model,data.frame'
predict2(object, newdata, ...)

# S4 method for class 'GLM_biomod2_model,SpatRaster'
predict2(object, newdata, ...)

# S4 method for class 'GLM_biomod2_model,data.frame'
predict2(object, newdata, ...)

# S4 method for class 'MARS_biomod2_model,SpatRaster'
predict2(object, newdata, ...)

# S4 method for class 'MARS_biomod2_model,data.frame'
predict2(object, newdata, ...)

# S4 method for class 'MAXENT_biomod2_model,SpatRaster'
predict2(object, newdata, ...)

# S4 method for class 'MAXENT_biomod2_model,data.frame'
predict2(object, newdata, ...)

# S4 method for class 'MAXNET_biomod2_model,SpatRaster'
predict2(object, newdata, ...)

# S4 method for class 'MAXNET_biomod2_model,data.frame'
predict2(object, newdata, ...)

# S4 method for class 'RF_biomod2_model,SpatRaster'
predict2(object, newdata, ...)

# S4 method for class 'RF_biomod2_model,data.frame'
predict2(object, newdata, ...)

# S4 method for class 'RFd_biomod2_model,SpatRaster'
predict2(object, newdata, ...)

# S4 method for class 'RFd_biomod2_model,data.frame'
predict2(object, newdata, ...)

# S4 method for class 'SRE_biomod2_model,SpatRaster'
predict2(object, newdata, ...)

# S4 method for class 'SRE_biomod2_model,data.frame'
predict2(object, newdata, ...)

# S4 method for class 'XGBOOST_biomod2_model,SpatRaster'
predict2(object, newdata, ...)

# S4 method for class 'XGBOOST_biomod2_model,data.frame'
predict2(object, newdata, ...)

Arguments

object

a biomod2_model object

newdata

a data.frame or SpatRaster object containing data for new predictions

predfun

a function, generated by the predict2 method specific to each biomod2_model subclass and used within the generic predict2.biomod2_model.SpatRaster or predict2.biomod2_model.data.frame to do the prediction

seedval

(optional, default NULL)
An integer value corresponding to the new seed value to be set

...

(optional))

Author

Remi Patin