[R] system/system2 command

Duncan Murdoch murdoch.duncan at gmail.com
Sat Dec 18 14:07:56 CET 2010


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.

Duncan Murdoch



More information about the R-help mailing list