R Under development (unstable) (2024-09-04 r87094 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(gstat) > d=expand.grid(x=c(-.5,.5), y=c(-.5,.5)) > d$z=1:4 > vv=vgm(model = "Tab", covtable = + variogramLine(vgm(1, "Sph", 1), 1, n=1e4,min = 0, covariance = TRUE)) > vv model psill maxdist 1 Tab NA 1 covariance table: [1] 1.0000000 0.7039712 0.4319496 0.2080384 0.0560108 0.0000000 > krige(z~1,~x+y,d,data.frame(x=0,y=0),vgm(1, "Sph", 1)) [using ordinary kriging] x y var1.pred var1.var 1 0 0 2.5 1.017767 > krige(z~1,~x+y,d,data.frame(x=0,y=0),vv) [using ordinary kriging] x y var1.pred var1.var 1 0 0 2.5 1.017863 > krige(z~1,~x+y,d[1:2,],data.frame(x=0,y=0),vgm(1, "Sph", 1)) [using ordinary kriging] x y var1.pred var1.var 1 0 0 1.5 1.267767 > krige(z~1,~x+y,d[1:2,],data.frame(x=0,y=0),vv) [using ordinary kriging] x y var1.pred var1.var 1 0 0 1.5 1.267863 > > proc.time() user system elapsed 1.07 0.17 1.20