[R] integers, reals

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Dec 1 12:18:13 CET 2000


> Date: Fri, 1 Dec 2000 11:47:38 +0100
> From: Martin Gotz <xgotz at informatics.muni.cz>

> how much bytes is one integer and real number in R?

Strictly, it varies by platform, but I think it is 4 and 8 on all
known platforms, even 64-bit ones.  Integers are required to be
at least 4 bytes long.

R 1.2.0 will have a function object.size() to give a rough idea of the size
of objects in memory.  (Rough, because attributing memory blocks to
objects is not exact.)  For example, on a 64-bit machine

> x <- integer(1000)
> object.size(x)
[1] 4056


-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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