The current definition of krige0 is as follows:
|
krige0 <- function(formula, data, newdata, model, beta, y, ..., |
|
computeVar = FALSE, fullCovariance = FALSE) { |
|
|
|
if (inherits(data, "ST")) |
|
stopifnot(identical(data@sp@proj4string@projargs, newdata@sp@proj4string@projargs)) |
|
else |
|
stopifnot(identical(data@proj4string@projargs, newdata@proj4string@projargs)) |
|
lst = extractFormula(formula, data, newdata) |
and, as far as I can tell, it's not currently possible to use this function when the underlying data is stored as an sf object.
Would you be interested in such extension? I would be happy to work on a PR but I'm not sure how to proceed. Should I convert the existing code to S4 approach and add a new method for sf objects? Or just add a series of if clauses to convert intermediate sf objects into sp format?
The current definition of
krige0is as follows:gstat/R/krige0.R
Lines 34 to 41 in d1ffbb7
and, as far as I can tell, it's not currently possible to use this function when the underlying data is stored as an
sfobject.Would you be interested in such extension? I would be happy to work on a PR but I'm not sure how to proceed. Should I convert the existing code to
S4approach and add a new method forsfobjects? Or just add a series of if clauses to convert intermediate sf objects into sp format?