[Rcpp-devel] Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()]

Dirk Eddelbuettel edd at debian.org
Tue Feb 22 23:54:24 CET 2011

On 22 February 2011 at 16:46, Ken.Williams at thomsonreuters.com wrote:
| On 2/22/11 4:32 PM, "Dirk Eddelbuettel" <edd at debian.org> wrote:
| >
| >What boolean test for 'am I on OS X 10.5' can you suggest?
| You could use system("uname -r"), which on my system gives 10.6.0 (even
| though my system is 10.6.6) and on a 10.5.x system seems to give
| 9.something.
| Or if you don't mind a command that will only exist on OS X, you can do
| system("sw_vers -productVersion"), which gives the actual OS version.

I could. It is a little crude. I'd rather use something already parsed. 

What is in Sys.info(), particularly fields 1 and 2:

R> Sys.info()[1:2]
            sysname             release 
            "Linux" "2.6.32-25-generic" 

Else, .Platform() starts with 'Darwin', right?  We do test for Darwin in two
places but never AFAICT for sub-versions.


Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com

More information about the Rcpp-devel mailing list