[R] R dynamic memory management
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Oct 10 05:28:55 CEST 2007
On Tue, 9 Oct 2007, Maura E Monville wrote:
> I have a loop that processes all the raw data files in agiven directory.
> It should allocate only the memory to accomodate the filenames list.
Without seeeing the script (see the footer of this and every R-help
message, including the second copy you sent), all we can say is that was
not what your script does. But that did seem implausible, as R needs
memory to 'process' each file.
> Each file is loaded into RAM one at a time and saved to another
> directory after processing. The R script runs fine but it had some
> memory problems so it was terminated before getting to the end of the
> list.
> This is a Windows XP desktop with ~ 1GB RAM
> In the following I am pasting R messages. I would appreciate some
> suggestion about memory handling:
>
> Error: cannot allocate vector of size 32.0 Mb
> In addition: Warning messages:
> 1: Reached total allocation of 958Mb: see help(memory.size) in: x[[i]] <- y
> 2: Reached total allocation of 958Mb: see help(memory.size) in: x[[i]] <- y
> 3: Reached total allocation of 958Mb: see help(memory.size) in: x[[i]] <- y
> 4: Reached total allocation of 958Mb: see help(memory.size) in: x[[i]] <- y
>
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
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