3

When I am using the raster package to predict a surface probability map of species distribution using the following functions in R, the following error occurrs:

CA132122200=raster("F:/CBG maps-UnProj/anlytic final map/mov472/landmergbackg1.tif_mw2/ca_132.tif")
mod=gam(y~s(CA132122200) ,data=training, family=binomial, gamma=1.4, logLink="logit")
 prediction <- predict(object = CA132122200, model = mod, type='response', progress='text')

errors:
object is not a matrix:
In addition: Warning messages:

1: In predict.gam(model, blockvals, ...) :
  not all required variables have been supplied in  newdata!

2: 'newdata' had 2032869 rows but variables found have 2315 rows"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.