[R] windows vs. linux code

Gabor Grothendieck ggrothendieck at gmail.com
Thu Feb 26 06:16:38 CET 2009


On Wed, Feb 25, 2009 at 10:58 PM, Ted Harding
<Ted.Harding at manchester.ac.uk> wrote:
>
>  if(length(grep("linux",R.Version()$os))){
>  windows <- function( ... ) X11( ... )
> }
>

Try

if (.Platform$OS.type == "windows") ... else ...




More information about the R-help mailing list