gstat
gstat copied to clipboard
error in fit.variogram.gls:
Ran into this error trying to use the fit.variogram.gls function with my own data, but was able to recreate with the example in the documentation:
library(sp)
data(meuse)
coordinates(meuse) = ~x+y
## Not run:
fit.variogram.gls(log(zinc)~1, meuse[1:40,], vgm(1, "Sph", 900,1))
Error in gamfn(h0, theta) : could not find function "gamfn" 4. fn(par, ...) 3. (function (par) fn(par, ...))(c(0.213570048247331, 0.213570048247331, 130.891022912055)) 2. optim(init, minfuncols0, gr = NULL, method = "L-BFGS-B", lower = c(0, 1e-09, 1e-09), upper = upperOptim)
- fit.variogram.gls(log(zinc) ~ 1, meuse[1:40, ], vgm(1, "Sph", 900, 1))
Thanks - this needs a bit more time to fix.