Open jpgannon opened 3 months ago
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
[.data.frame
predict(m, predictionLocations = meuse.grid[,c("dist","ffreq")]) returns: Error in [.data.frame(predictionLocations@data, , object@spModel$features) : undefined columns selected
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 selectedpredict(m, predictionLocations = meuse.grid[,c("dist","ffreq")]) returns: Error in
[.data.frame
(predictionLocations@data, , object@spModel$features) : undefined columns selected