[R] Too large?

Thomas Lumley tlumley at u.washington.edu
Thu May 23 22:23:15 CEST 2002

On Thu, 23 May 2002, Kenneth Cabrera wrote:

> Hi R Experts:
> I'm trying to run a "lm" model with a dataframe of 20607 records (and 23
> variables, many of them factors) . (See at the end of the meesage)
> but I obtain the following message:
> Error: cannot allocate vector of size 522580 Kb
> I use the --max-mem-size 1790Mb option (because if I use a bigger number
> (1800Mb)  it shows me a window with "Cannot reserve memory:terminating"
> message)

32-bit OSs typically won't give a process more than 2Gb of memory (and R
itself takes some), so that seems reasonable.

In order for this not to be enough the factors must have fairly large
numbers of levels -- 23 variables and 20,000 records isn't a lot on a
computer like yours.

Both Bill Venables and Brian Ripley have circulated functions for the
related problem of a regression model with one factor that has too many
levels. They are in section 7.1 of `S programming' but may also be in the
mailing list archives.  The same approaches could be used for your


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

More information about the R-help mailing list