Re: [Rd] How to test if R is running on a Mac

From: Oleg Sklyar <osklyar_at_ebi.ac.uk>
Date: Wed, 19 Sep 2007 15:11:16 +0100

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

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed 19 Sep 2007 - 14:13:37 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 19 Sep 2007 - 14:41:04 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.