Skip to content

error from universal kriging with krige()

2 messages · Sven Burbeck, Virgilio Gomez-Rubio

#
Hello,

when I try to apply universal kriging by krige() I produce the following
error:
fit.ranges = TRUE,fit.method = 7)
myBlt_utm, newdata = myPointGrid_utm, model = myVgmf)
Error in gstat.formula.predict(d$formula, newdata, na.action = na.action,  :
  NROW(locs) != NROW(X): this should not occur
In addition: Warning messages:
1: 'newdata' had 2701 rows but variable(s) found have 911 rows
2: 'newdata' had 2701 rows but variable(s) found have 911 rows


I know there was a posting about this error. There it was a coordinate
problem but still I don't know how to solve the problem.

Can anybody give me a hint?

Thanks in advance,
Sven
#
Sven,

It looks like myPointGrid_utm has more points that rows in the
associated dataframe. Could you check that? For example, with

nrow(coordinates(myPointGrid_utm))
nrow(myPointGrid_utm at data)

Best,

Virgilio