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

2010-07-03 Thread Prof Brian Ripley

On Fri, 2 Jul 2010, Jeffrey Horner wrote:


Hi,

Is this sufficient?


Yes, if you want to know in R code.


if (.Machine$sizeof.pointer==4){
 cat('32\n')
} else {
 cat('64\n')
}

Or is it better to test something in R.version, say os?


Not 'os' (the OS is the same), but 'arch' changes.  Just as on a Mac 
or on Linux.



I'd like to use this to specify appropriate linker arguments when
building the RMySQL windows package.


If you mean *installing*  (R CMD INSTALL, not R CMD build) the 
documented way is to use the environment variable R_ARCH: there are 
also make variables available, e.g. WIN.  See 
http://www.stats.ox.ac.uk/~ripley/Win64/W64porting.html (which is 
linked from the appropriate manuals).




Jeff
--
http://biostat.mc.vanderbilt.edu/JeffreyHorner

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


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

2010-07-02 Thread Jeffrey Horner
Hi,

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?

I'd like to use this to specify appropriate linker arguments when
building the RMySQL windows package.

Jeff
-- 
http://biostat.mc.vanderbilt.edu/JeffreyHorner

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


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

2010-07-02 Thread Martin Maechler
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

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel