Skip to content
Prev 22733 / 398502 Next

Out of memory

Nikolaus Hansen wrote:
R-1.5.1 is recent.
?memory.limit says: 

Usage: memory.limit(size = NA)
Arguments: size  [...] request a new limit, in Mb. 
                                               ^^
So something like memory.limit(500) is more reasonable, depending on the
size of RAM in your machine.
It is much more convenient to set  --mex-mem-size=500M  at the command
line, how it works is described in the R for Windows FAQs.
a) Be sure a reasonable amount of memory was really allocated.
b) Rewrite your R code to consume less memory and think about what is
needed in memory at one time. Can you divide the computations into
"smaller" ones releted to memory usage?
c) Buy some more RAM.
d) Wait ten years for a much bigger computer. ;-)

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._