[R-sig-Geo] memory - cannot allocate vector of size 'x'

Jose Funes jefunes at gmail.com
Mon Mar 3 23:35:36 CET 2008


Dear members,

I would like to share some of the problems that I have run into R when
importing ascii files. I described the problem below, if any have
experienced similar issues I will appreciate you support.

I am working with raster data(maps) and importing it as ascii files to
R. I am stacking 9 layers (10MB~each, total 90MB). However, when
stacking the eight layer I get the following message "Error: cannot
allocate vector of size 10.8 Mb". I did a little of bit of reading
about this, and some suggestions are to increase the memory
allocation. I increased it to 3GB  using the following command:
memory.limit(size=3000) but the problem still persist.

code:
1. predictorslide2 <- readAsciiGrid("sol_spr_lide2.asc")
...
...
8. predictorslide2 <- cbind(predictorslide2,readAsciiGrid("umca_pr_lide2.asc"))

Also I got a similar error when running regression kriging:
Error: cannot allocate vector of size 6.7 Mb
In addition: There were 12 warnings (use warnings() to see them)

warning messages:
1: Reached total allocation of 1535Mb: see help(memory.size)
...
3: In slot(value, what) <- slot(from, what) :
...
8: In slot(value, what) <- slot(from, what) :
  Reached total allocation of 1535Mb: see help(memory.size)
...
12: In `slot<-`(`*tmp*`, what, value = structure(c(-293438.89990765,  ... :
  Reached total allocation of 1535Mb: see help(memory.size)

I will appreciate your suggestions. I have also considered splitting
the data  but would like to explore other solutions.

Regards,

Jose Funes




More information about the R-sig-Geo mailing list