I think there are two different questions here: 1) Is R running under darwin, the underlying OS of MacOS X? You can test that by Sys.info or R.version$platform. It seems unlikely that you would need this. We do need to distinguish darwin at C level, as it is a very unusual 'unix', a much-modified version of FreeBSD. One thing that does show up at R level is the use of DYLD_LIBRARY_PATH rather than LD_LIBRARY_PATH.
2) Is R runnng as part of the R.app GUI? For that, test .Platform$GUI (it is I believe "AQUA" iff R.app is in use). On Mon, 15 Jan 2007, Philippe Grosjean wrote: > This question is probably trivial, but I don't find the answer. I have > code that is different for Windows, Unix/Linux and Mac OSX. The man page > of .Platform tells that .Platform$OS.type is the right way to test for > it... but it also tels that it returns either "windows" or "unix". Is > Mac OS X reported as "unix"? If yes, how do I make the difference? > Thanks, > > Philippe Grosjean -- Brian D. Ripley, [EMAIL PROTECTED] 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 ______________________________________________ [email protected] 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.
