# NOT RUN {
if (all(c(require(gstat), require(sp)))) {
library(gstat)
library(sp)
data(meuse)
sp::coordinates(meuse) <- ~ x + y
vgm1 <- gstat::variogram(log(zinc) ~ 1, meuse)
fit <- gstat::fit.variogram(vgm1, gstat::vgm(1, "Sph", 300, 1))
res <- vgmSCV(fit)
}
# }
Run the code above in your browser using DataLab