[R] memory in R

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Oct 11 21:15:18 CEST 2004


On Mon, 11 Oct 2004, Vadim Ogranovich wrote:

> Setting A <- NULL doesn't immediately release the memory, the memory is
> actually released in gc(), which R calls for you at some "random" time.
> In situations like this I explicitely call gc() and do not wait for R to
> do this, e.g
> A <- NULL; gc()

`Some random time' always includes immediately before giving an 
out-of-memory error message.

What's wrong with rm(A), as used in the first session in `An Introduction 
to R'?

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list