I am writing some R code that generates some figures. I am primarily
developing on GNU/Linux, but will ultimately run the code on Windows
in order to get WMF files I can integrate in an existing document.
The win.metafile() function, of course, doesn't exist in the GNU/Linux
version of R. I am contemplating writing an abstraction layer that
runs the right thing, but I need to know how the code can figure out
which platform it is running on. I searched the mailing list archives
and online docs but didn't find anything relevant. Pointers? Thanks
in advance.
--
Russell Senior ``The two chiefs turned to each other.
seniorr at aracnet.com Bellison uncorked a flood of horrible
profanity, which, translated meant, `This is
extremely unusual.' ''
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
.Platform$OS.type -roger _______________________________ UCLA Department of Statistics rpeng at stat.ucla.edu http://www.stat.ucla.edu/~rpeng On 6 Jul 2002, Russell Senior wrote:> > I am writing some R code that generates some figures. I am primarily > developing on GNU/Linux, but will ultimately run the code on Windows > in order to get WMF files I can integrate in an existing document. > The win.metafile() function, of course, doesn't exist in the GNU/Linux > version of R. I am contemplating writing an abstraction layer that > runs the right thing, but I need to know how the code can figure out > which platform it is running on. I searched the mailing list archives > and online docs but didn't find anything relevant. Pointers? Thanks > in advance. > > -- > Russell Senior ``The two chiefs turned to each other. > seniorr at aracnet.com Bellison uncorked a flood of horrible > profanity, which, translated meant, `This is > extremely unusual.' '' > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Maybe something like this?
Platform <- function()
{list( OS.type = if(charmatch("ming", version$os, nomatch=0))
"windows" else
if(exists("unix")) "unix" else
"unkown")
}
Russell Senior wrote:
> I am writing some R code that generates some figures. I am primarily
> developing on GNU/Linux, but will ultimately run the code on Windows
> in order to get WMF files I can integrate in an existing document.
> The win.metafile() function, of course, doesn't exist in the GNU/Linux
> version of R. I am contemplating writing an abstraction layer that
> runs the right thing, but I need to know how the code can figure out
> which platform it is running on. I searched the mailing list archives
> and online docs but didn't find anything relevant. Pointers? Thanks
> in advance.
>
> --
> Russell Senior ``The two chiefs turned to each other.
> seniorr at aracnet.com Bellison uncorked a flood of horrible
> profanity, which, translated meant, `This is
> extremely unusual.' ''
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._