Skip to content
Prev 1504 / 29559 Next

krige{gstat} error with new data prediction

Herry, in

k1<-krige(z ~ x+y, ~x+y, data=shp1, newdata=a1000, model=m2, nmax=40)


shpl is alread a SpatialPointsDataFrame object, so you shouldn't specify 
it's coordinates, ~x+y. Rather, use

k1<-krige(z ~ x+y, shp1, a1000, model=m2, nmax=40)


I must admit that a more helpful error message would be useful here, as 
this starts to become a FAQ.
--
Edzer
Alexander.Herr at csiro.au wrote: