Skip to content

quartz() and windows()

5 messages · Nino Hardt, Marc Schwartz, David Winsemius +1 more

#
Hi,

when windows and mac users collaborate, one always has to use search&replace
on the quartz() function.

Is there a better way? Some command which tells whether one is working in a
Windows or OSX setting?



Thanks
Nino
#
on 12/07/2008 10:17 AM Nino Hardt wrote:
See ?.Platform

HTH,

Marc Schwartz
#
Hi,

thanks for your quick reply.

I just added the following in front of everything else in the script:

if(.Platform$OS.type=="windows") {
  quartz<-function() windows()
}

Works as expected.


Thanks,
Nino


-----Urspr?ngliche Nachricht-----
Von: Marc Schwartz [mailto:marc_schwartz at comcast.net] 
Gesendet: Sonntag, 7. Dezember 2008 19:11
An: Nino Hardt
Cc: r-help at r-project.org
Betreff: Re: [R] quartz() and windows()
on 12/07/2008 10:17 AM Nino Hardt wrote:
search&replace
a
See ?.Platform

HTH,

Marc Schwartz
#
One way (from my MacPro OS X 10.5.5):

 > .Platform$OS.type
[1] "unix"

Another:

 > Sys.info()["sysname"]
  sysname
"Darwin"

The help pages say NOT to do this:
 > R.version$os
[1] "darwin9.5.0"

--  
David Winsemius
On Dec 7, 2008, at 11:17 AM, Nino Hardt wrote:

            
#
On Sun, 7 Dec 2008, Marc Schwartz wrote:

            
Or in this case, ?dev.new, which covers all platforms, even 
non-interactive use.