I'm trying to understand the way I can use the ff package to overcome the error
"Error: cannot allocate vector of size 1.1 Mb"
while using kriging/ gaussian simulation. I don't know how to change the input data. Is there any idea to help me do that?
I'm using the gstat package to perform the simulation as follows:
library(sp)
data(meuse)
coordinates(meuse) = ~x+y
data(meuse.grid)
gridded(meuse.grid) = ~x+y
m <- vgm(.59, "Sph", 874, .04)
# ordinary kriging:
x <- krige(log(zinc)~1, meuse, meuse.grid, model = m, nsim=1000)
For Gaussian simulation you need to set the neighbourhood size to some value, otherwise the memory consumption grows unlimited. You can do this e.g. by setting
nmax=50
, so the 50 nearest observed (or simulated) values are used as conditioning data.