[R] data usage

Thomas Lumley tlumley at u.washington.edu
Tue Mar 30 01:16:25 CEST 2004


On Mon, 29 Mar 2004, Edwin Leuven wrote:

> > Stata tends to store data as float, integer, or even byte where
> > appropriate for the precision.  This is one source of space saving. A
> > factor of 2 is not atypical.
>
> i was suspecting something like this.
>
> what does R do? default to double always (or something like this)?
>
> is this a deliberate design choice made by the R people or just
> convenience while not having to worry about datatypes?

R has only numeric (C double) and integer (C int) types for storing
numeric data. I think the reason for not having single precision is
insufficient accuracy in computation. Shorter integers might be useful
sometimes.

	-thomas




More information about the R-help mailing list