[Rd] Best way to determine if you're running 32 or 64 bit R on windows

Martin Maechler maechler at stat.math.ethz.ch
Fri Jul 2 23:09:29 CEST 2010


Jeffrey Horner <jeffrey.horner <at> gmail.com> writes:

> Is this sufficient?
> 
> if (.Machine$sizeof.pointer==4){
>   cat('32\n')
> } else {
>   cat('64\n')
> }
> 
> Or is it better to test something in R.version, say os?

No, the above is perfect,  as it also works on other platforms to distinguish
32-bit and 64-bit.

Regards, Martin



More information about the R-devel mailing list