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

From: Keith Satterley <keith_at_wehi.EDU.AU>
Date: Thu, 20 Sep 2007 22:11:11 +1000

I use["sysname"].

It returns "Darwin" on a Mac, "Windows" on MS Windows and "Linux" on my Linux box. Is this sufficient for your needs,
I'm using R-2.6.0alpha on MS Windows and 2.5.0 on Mac and Linux at the moment.


Keith Satterley
Bioinformatics Division
The Walter and Eliza Hall Institute of Medical Research wrote:
> Send R-devel mailing list submissions to
> Message: 1
> Date: Wed, 19 Sep 2007 15:41:22 +0200
> From: Gorjanc Gregor <>
> Subject: [Rd] How to test if R is running on a Mac
> To: "" <>
> Message-ID:
> <>
> Content-Type: text/plain; charset="us-ascii"
> 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 mailing list Received on Thu 20 Sep 2007 - 12:12:20 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 Thu 20 Sep 2007 - 18:41:04 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.