Re: [R] Integer vs numeric

From: Roland Rau <>
Date: Mon, 28 Jan 2008 16:23:12 -0500

Christophe Genolini wrote:
> Hi the list.
> I do not understand the philosophy behind numeric and integer.
> - 1 is numeric (which I find surprising)
> - 2 is numeric.
> - 1:2 is integer.
> Why is that ?
I hope I can answer your question at least partly: Numeric means "double", i.e. internally stored as a double precision floating point number. As far as I know this is the default. You can, however, force an object to be, e.g. an integer, a single prevision float or a double precision float.


So far I only needed this if I wanted to call some C or Fortran code. Maybe there are other applications when you need to force the type?

I hope this helps at least a bit further?

Roland mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Mon 28 Jan 2008 - 21:28:24 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 28 Jan 2008 - 23:30:08 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive