From hin-tak.leung at cimr.cam.ac.uk  Thu Sep 20 00:37:52 2007
From: hin-tak.leung at cimr.cam.ac.uk (Hin-Tak Leung)
Date: Wed, 19 Sep 2007 23:37:52 +0100
Subject: [Rd] How to test if R is running on a Mac
In-Reply-To: <59d7961d0709191351l1c4f1b22t84a1db9b246ba26c@mail.gmail.com>
References: <F189E18BBAA8B6479F618B9044CF4E9C0188517825@owa.bfro.uni-lj.si>	<46F1335C.6050107@stats.uwo.ca>
	<59d7961d0709191351l1c4f1b22t84a1db9b246ba26c@mail.gmail.com>
Message-ID: <46F1A4C0.9030702@cimr.cam.ac.uk>

On linux boxes,
   version$os and R.version$os
is 'linux-gnu'. I assume that it would be 'darwin-apple' on
Mac's?

Henrik Bengtsson wrote:
> isApple <- function(...) {
>   isApple <- FALSE;
>   tryCatch({
>     ans <- readline("Do you see an Apple key on the keyboard you are
> typing on? yes/no");
>     isApple <- (ans == "yes");
>   }, mouseClick = function(ex) {
>     isApple <<- TRUE;
>   })
> }
> 
> /H
> 
> 
> On 9/19/07, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
>> On 9/19/2007 9:41 AM, 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.
>> Remember to also look at .Platform$GUI:  the GUI version behaves quite
>> differently from command line R from a user's point of view (both on the
>> Mac and on Windows), and occasionally from a programmer's point of view
>> (e.g. the graphics device on the Mac).
>>
>> Duncan
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] How to test if R is running on a Mac
Hin-Tak Leung