Revision 2b28322cd75357fc6c5547746b38a5c7d71f576a authored by Edzer J. Pebesma on 02 June 2005, 13:54:10 UTC, committed by cran-robot on 02 June 2005, 13:54:10 UTC
1 parent e5a07f3
Raw File
covtable.Rout.save

R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.1.0 beta (2005-04-10), ISBN 3-900051-07-0

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 a 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 = 
+ 	variogram.line(vgm(1, "Sph", 1), 1, n=1e4,min = 0, covariance = TRUE))
> vv
  model psill maxdist
1   Tab     0       1
covariance table:
        1      2001      4001      6000      8000     10000 
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,d[1:2,],data.frame(x=0,y=0),vgm(1, "Sph", 1))
[using ordinary kriging]
  x var1.pred var1.var
1 0       1.5    0.875
> krige(z~1,~x,d[1:2,],data.frame(x=0,y=0),vv)
[using ordinary kriging]
  x var1.pred  var1.var
1 0       1.5 0.8751125
> 
back to top