[R] Branching, depending upon operating system

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Mar 31 14:09:24 CEST 2006


On Fri, 31 Mar 2006, Frank Rossdeutscher wrote:

> From my current code, I need to call either a batch file or shell script,
> depending on what operating system R is running. But before that I need to
> find out, whether the machine is running Windows or Linux. I found the
> "getBuiltinOs()" command in the utils package, but I cant get it to work. It

There is no such function in that or any other standard or CRAN package, 
but there is such a method for a class in the contributed R.utils package.

> really shouldn`t be difficult, but how can I do an if-branch using that (or
> a different) command?

?.Platform shows you how.

> --
> Regards,
> Frank Rossdeutscher
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
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




More information about the R-help mailing list