[R] Memory management

Ross Ihaka ihaka at stat.auckland.ac.nz
Tue Apr 27 21:58:49 CEST 1999

On 27 Apr 1999, Peter Dalgaard BSA wrote:

> Konstantinos Euripides Vorloou <K.E.Vorloou at durham.ac.uk> writes:

> > I try to open a matrix 8000x8000 by issuing
> > 
> > x<-matrix(nrow=8000,ncol=8000)
> > 
> > params. My matrix should hold roughly 1 Meg of memory.
> > Is this correct ?

On 27 Apr 1999, Peter Dalgaard BSA wrote:

> I get 8000*8000*8 = 512000000 bytes, alias 488Meg...

Peter's arithmetic is correct.  By default R stores numeric values
in double precision (32-bit integers are the other possibility).

There are 8000*8000 elements in the matrix, each occupying 8 bytes
(the size of a double).

This is a very large matrix.  R isn't designed to handle problems on this
scale (not many interactive systems are).  If you really want to try
problems of this scale, you'd be better off trying Fortran or C.


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