Hi All,


I am trying to figure out how to simulate a continuous spatial surface with
strong spatial autocorrelation. Then, I would like to divide this spatial
surface into by 8 x 8 grids and take a sample of 15 locations within each
grid and the corresponding values.
For example, here is a sample code adopted from Santiago
Beguería<http://santiago.begueria.es/>.


library(gstat)

xy <- expand.grid(1:100, 1:100)

names(xy) <- c("x","y")

g.dummy <- gstat(formula=z~1, locations=~x+y, dummy=T, beta=1,
model=vgm(psill=0.025,model="Exp",range=10), nmax=20)

# Make four simulations based on the gstat object

yy <- predict(g.dummy, newdata=xy, nsim=1)

# show one realization

gridded(yy) = ~x+y

spplot(yy[1])
My questions is how to divide this spatial surface into 8x8 girds and then
take a sample of 15 locations and their values? I would greatly appreciate
if anybody can provide some ideas or pointers how to implement these
scenarios in R. Thanks all for your help! Dani

	[[alternative HTML version deleted]]

