[R] R support for 64 bit integers

David Winsemius dwinsemius at comcast.net
Tue Aug 10 14:42:12 CEST 2010


On Aug 9, 2010, at 2:45 PM, Theo Tannen wrote:

> Are integers strictly a signed 32 bit number on R even if I am  
> running a 64
> bit version of R on a x86_64 bit machine?
>
> I ask because I have integers stored in a hdf5 file where some of  
> the data
> is 64 bit integers. When I read that into R using the hdf5 library  
> it seems
> any integer greater than 2**31 returns NA.

That's the limit. It's hard coded and not affected by the memory  
pointer size.

>
> Any solutions?

I have heard of packages that handle "big numbers". A bit of searching  
produces suggestions to look at gmp on CRAN and Rmpfr on R-Forge.

-- 
David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list