From osklyar at ebi.ac.uk  Wed Sep 19 16:11:16 2007
From: osklyar at ebi.ac.uk (Oleg Sklyar)
Date: Wed, 19 Sep 2007 15:11:16 +0100
Subject: [Rd] How to test if R is running on a Mac
In-Reply-To: <F189E18BBAA8B6479F618B9044CF4E9C0188517825@owa.bfro.uni-lj.si>
References: <F189E18BBAA8B6479F618B9044CF4E9C0188517825@owa.bfro.uni-lj.si>
Message-ID: <1190211076.7391.2.camel@maitai.windows.ebi.ac.uk>

I had the same problem. The following line using either 'apple' or
'darwin' does the job for me (tested on many different Macs):

length(grep("apple", tolower(Sys.getenv("R_PLATFORM")))) != 0



On Wed, 2007-09-19 at 15:41 +0200, Gorjanc Gregor wrote:
> Hi!
> 
> Is there any way to test if R is running on a Mac? I usually use
> value of .Platform$OS.type for windows or unix, but Mac falls in the
> latter group.
> 
> Thanks, Gregor
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
-- 
Dr Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +44-1223-494466



[Rd] How to test if R is running on a Mac
Oleg Sklyar