[R] removing of memory - optim()?
prokopczuk at uni-mannheim.de
Wed Mar 8 10:47:48 CET 2006
I have the following problem: I am using Windows XP as OS and have a R
program which uses optim() in a loop. Although I overwrite every variable in
the loop the memory R is using is increasing until my system breaks down
because the swap file is getting just to big. I suspect that optim() is
creating some variables which are not deleted automatically. So I tried to
do the following: every 10th loop or so, I save the variables I want to
keep, delete the memory with rm(list=ls(all=TRUE)), and load back the data I
saved before. But this is also not working. rm(list=ls(all=TRUE)) does not
delete everything (I can see in the Task Manager of Windows that the memory
occupied by the Rgui process stays huge).
Does anybody had similar problems and/or know how to solve it. Thanks in
advance for your help.
More information about the R-help