[R] system/system2 command

Gabor Grothendieck ggrothendieck at gmail.com
Sat Dec 18 14:58:27 CET 2010

On Sat, Dec 18, 2010 at 8:07 AM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:
> Gabor Grothendieck wrote:
>> On Fri, Dec 17, 2010 at 4:36 PM, Jeff Breiwick <jeff.breiwick at noaa.gov>
>> wrote:
>>> All,
>>> I had a simple function call I used to open up a dos shell running R
>>> under
>>> Win XP:
>>> system("cmd.exe", wait=FALSE, invisible=FALSE).
>>> This does not work with R 2.12.1 - I get a window that briefly flashes
>>> open
>>> but then disappears. Does anyone know the method to open a DOS command
>>> window in running R with Win XP? Thank you.
>> This works on my Vista system:
>> shell("start cmd")
> Is start back in Vista?  There was a start.exe in Windows95, but I think it
> disappeared in XP and I had to write my own. (Or maybe it became an internal
> command?) Brian Ripley added a similar program "open.exe" (based on the OSX
> name, I think) to R, so if "start cmd" fails, "open cmd" might succeed.

Yes its in Vista and its at least in XP Pro according to:

Note that its internal to cmd so if you are using some other command
line shell then you will need to do:
   cmd /c start

Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

More information about the R-help mailing list