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:> 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?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:> Hi, > > when windows and mac users collaborate, one always has to usesearch&replace> on the quartz() function. > > Is there a better way? Some command which tells whether one is working ina> Windows or OSX setting?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:> 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 > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
On Sun, 7 Dec 2008, Marc Schwartz wrote:> on 12/07/2008 10:17 AM Nino Hardt wrote: >> 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? > > See ?.PlatformOr in this case, ?dev.new, which covers all platforms, even non-interactive use. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595