[R] numerical accuracy, dumb question

Marc Schwartz MSchwartz at MedAnalytics.com
Sat Aug 14 19:15:37 CEST 2004


On Sat, 2004-08-14 at 12:01, Marc Schwartz wrote:

> There also appears to be some memory allocation "adjustment" at play
> here. Note:
> 
> > object.size(factor("1000000000000"))
> [1] 244
> 
> > object.size(factor("1000000000000", "a"))
> [1] 236


Arggh.

Negate that last comment. I had a typo in the second example. It should
be:

> object.size(factor(c("1000000000000", "a")))
[1] 252

which of course results in an increase in memory.

Geez. Time for lunch.

Marc




More information about the R-help mailing list