[R] RAM usage
Thomas Lumley
tlumley at u.washington.edu
Mon Oct 21 16:09:54 CEST 2002
On Mon, 21 Oct 2002, Vaidotas Zemlys wrote:
> Hi,
>
>
> >> I'm having problems while working with large data sets with R 1.5.1 in
> >> windows 2000. Given a integer matrix size of 30 columns and 15000 rows
> >> my function should return a boolean matrix size of about 5000 rows and
> >> 15000 columns.
>
> >That's 75million items of 4bytes each, hence almost 300Mb for that one
> >object.
>
> Does that mean that R reserves 4 bytes for logical object with length 1? On
> the whole how much memory R allocates for different data types? I searched
> a bit, but I didn't find anything useful on this subject.
The information is implicitly in the help for .C/.Fortran.
R stores integer, factor and logical variables in vectors of C int,
numeric variables in vectors of C double. On most platforms these are 4
and 8 bytes respectively. Lists are vectors of pointers, using 4 bytes
per element on 32 bit platforms, 8 bytes on 64bit platforms.
-thomas
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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