[R] system/system2 command

Duncan Murdoch murdoch.duncan at gmail.com
Mon Dec 20 02:11:58 CET 2010


On 17/12/2010 4:36 PM, Jeff Breiwick 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 is a new bug in 2.12.1, which I am about to fix in R-patched.  The 
problem was that it was passing a null input stream to cmd.exe, which 
saw an immediate EOF, and quit.  A similar thing happened in Rterm, 
where system("cmd") should drop into a command shell in the same window, 
but it would immediately exit.

Duncan Murdoch



More information about the R-help mailing list