Re: [R] R in different OS

2011-02-26 Thread David Scott
Not sure exactly what the original poster was after, but for distinguishing when I am working on different machines with different OS, I use something like this: ### Set some state variables opSys - Sys.info()[sysname] if (opSys == Windows){ linux - FALSE } else { linux - TRUE } David

Re: [R] R in different OS

2011-02-26 Thread Prof Brian Ripley
It is less clear what you are after, but the canonical way to decide if your R session is on Windows is .Platform$OS.type == windows Unlike {R.}version$os and Sys.info()[sysname], the set of values here is known and documented. As ?R.version does say: Do _not_ use ‘R.version$os’ to

Re: [R] R in different OS

2011-02-26 Thread David Scott
Thanks Brian, I stand corrected. David Scott On 27/02/2011 12:32 a.m., Prof Brian Ripley wrote: It is less clear what you are after, but the canonical way to decide if your R session is on Windows is .Platform$OS.type == windows Unlike {R.}version$os and Sys.info()[sysname], the set of

[R] R in different OS

2011-02-25 Thread Hui Du
Hi All, I have two Rs, one has been installed in Windows system and another one has been installed under UNIX system. Is there any environmental variable or function to tell me which R I am using? The reason that I need to know it is under different system, the data path could

Re: [R] R in different OS

2011-02-25 Thread Jorge Ivan Velez
Hi Hui, May be sessionInfo() is what you are looking for. See ?sessionInfo as well as ?version for more details. You can run the following on your R session and see what comes up: sessionInfo() sessionInfo()$R.version$platform version$platform Then, you might use ifelse() to set up the right

Re: [R] R in different OS

2011-02-25 Thread Marc Schwartz
On Feb 25, 2011, at 12:23 PM, Hui Du wrote: Hi All, I have two Rs, one has been installed in Windows system and another one has been installed under UNIX system. Is there any environmental variable or function to tell me which R I am using? The reason that I need to know

Re: [R] R in different OS

2011-02-25 Thread Ista Zahn
Hi, see ?R.version Something like if(version$os == mingw32) { path = /ABC} else { path = /DEF } might do it, but I'm not sure exactly what possible values version$os can take or what determines the value exactly. Best, Ista On Fri, Feb 25, 2011 at 1:23 PM, Hui

Re: [R] R in different OS

2011-02-25 Thread David Winsemius
On Feb 25, 2011, at 1:23 PM, Hui Du wrote: Hi All, I have two Rs, one has been installed in Windows system and another one has been installed under UNIX system. Is there any environmental variable or function to tell me which R I am using? The reason that I need to know

Re: [R] R in different OS

2011-02-25 Thread Noah Lorang
See str(version). version$platform or version$os should work for what you're looking for. Cheers, Noah On Feb 25, 2011, at Feb 25 1:23 PM , Hui Du wrote: Hi All, I have two Rs, one has been installed in Windows system and another one has been installed under UNIX system.

Re: [R] R in different OS

2011-02-25 Thread Hui Du
Great. Thanks. Best Regards, Hui Du Data Ventures Inc -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Friday, February 25, 2011 12:59 PM To: Hui Du Cc: r-help@r-project.org Subject: Re: [R] R in different OS On Feb 25, 2011, at 1:23 PM, Hui Du wrote

Re: [R] R in different OS

2011-02-25 Thread MacQueen, Don
Look at Sys.info() -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 2/25/11 10:23 AM, Hui Du hui...@dataventures.com wrote: Hi All, I have two Rs, one has been installed in Windows system and another