Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to do a groundwater elevation map with an Ordinary Kriging on R, but always resulting on the lack of memory

cannot allocate vector of size 146.5 Mb

allocation (windows xp 32bit). Should I increase memory size and how, or should I reduce the grid size and how (kind of a newbie in R)?

following this example

share|improve this question
what is your desired grid size? (how many rows/columns?) – Mike T Mar 28 '11 at 18:23
Did you already have a look at the R FAQ. – rengis Mar 28 '11 at 18:36
The grid size is 3202*2993. And I was doing the OK on a grd of 1's (I think!!) like the link but it always gaved that error. Then I changed 1 by 100 but it gaved the same error. – Ulmi Mar 28 '11 at 20:00
Consider migrating this question to SO: there are a lot of R experts there. – whuber Mar 28 '11 at 22:10
Something similar was discussed here:… – markusN Mar 28 '11 at 22:52

You do not provide us with the size of the data you want to krige, nor the size of the support on which you want to do that kriging, but I assume this would be pretty big.

The problem with R is that is loads everything into memory. In that case, you are simply running out of RAM.

Kriging is a very demanding process. The way you can manage that is to parrallelize it. See demo(snow) in the gstat package.

Alternatively, you can also use another interpolation method, more suitable to big data (eg the* functions in GRASS).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.