I ran Random Forest Model in R then now i call it to predict my dataset
predict.rf<-predict(layers.stack,random.forest, na.rm=T, type='response')
However it comes with one error as follow:
Error in UseMethod("predict") : no applicable method for 'predict' applied to an object of class "c('randomForest.formula', 'randomForest')"
Do anyone know how to fix this error pls?
Regards