Hi Cheng,

Check out the keep() function in package:gdata.

And to be sure the "removed" objects are really removed from system memory i think you need to run gc().

hth,

Karl

On 8/23/2010 9:00 PM, Cheng Peng wrote:

How to remove all R objects in the RAM except for a few specified ones?
rm(list=ls()) removes all R objects in the R work space.

Another question is that whether removing all R objects actually releases
the RAM? Thanks.

--
Karl Brand <k.br...@erasmusmc.nl>
Department of Genetics
Erasmus MC
Dr Molewaterplein 50
3015 GE Rotterdam
P +31 (0)10 704 3409 | F +31 (0)10 704 4743 | M +31 (0)642 777 268

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to