landmap icon indicating copy to clipboard operation
landmap copied to clipboard

Example of how to use predictionLocations argument in predict()?

Open jpgannon opened this issue 11 months ago • 0 comments

Can you provide an example of how to use the predictionLocation argument in predict() with an object from train.splearner?

A reproducible version of the issues I am having is below using the meuse demo...

demo(meuse) m <- train.spLearner(meuse["zinc"], covariates=meuse.grid[,c("dist","ffreq")], lambda = 1)

predict(m, predictionLocations = meuse.grid) returns: Error in [.data.frame(predictionLocations@data, , object@spModel$features) : undefined columns selected

predict(m, predictionLocations = meuse.grid[,c("dist","ffreq")]) returns: Error in [.data.frame(predictionLocations@data, , object@spModel$features) : undefined columns selected

jpgannon avatar Mar 25 '24 14:03 jpgannon