https://github.com/cran/gstat
Raw File
Tip revision: 450a450643cea4c75fc74f60c7545bbd9b07e7a8 authored by Edzer Pebesma on 02 April 2014, 14:38:29 UTC
version 1.0-19
Tip revision: 450a450
sim.R
options(digits=6)
library(sp)
data(meuse)
set.seed(158229572)
new.locs <- data.frame(x = c(181170, 180310, 180205, 178673, 178770, 178270),
	y = c(333250, 332189, 331707, 330066, 330675, 331075))
library(gstat)
krige(zinc ~ 1, ~ x + y, meuse, newdata = new.locs, 
		model = vgm(1.34e5, "Sph", 800, nug = 2.42e4), 
		block = c(40,40), nmax = 40, nsim = 10)
back to top