[R] system(..., invisible=FALSE, show.output.on.console=FALSE) in Windows 7

Gabor Grothendieck ggrothendieck at gmail.com
Fri Mar 11 15:58:36 CET 2011


On Wed, Mar 9, 2011 at 12:14 PM, Ralph Olsson
<ralpholsson at btinternet.com> wrote:
> Hello,
>
> I work for a company in which a number of employees use R. Many of them like to run executables via the system function in such a way that the output of that executable is displayed in a separate window. To give an example of the behavior they require, the following command can be run in R GUI:
>
> system("cmd",invisible=FALSE,show.output.on.console=FALSE)
>
> The result is that a command prompt opens up and can be used interactively until it is closed. We have never had a problem with this command running R on Windows XP machines.
>
> Recently a number of us have switched to PCs running Windows 7. Under this operating system the above command often, if not always, fails to open a window. Some people can successfully run the command in one R session but then fail to get a window if a second R session is started. Others cannot get a window to open at all. We've tested the command with R 2.12.1, 2.12.1 patched, 2.12.2 and 2.12.2 patched (all in both 32 and 64 bit). All of these exhibit the same problem.
>
> I raised the issue as a bug (https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14516), but this was promptly closed as being "not reproducible". Since we are having issues running the above command on all of our windows 7 PCs but none of our windows XP PCs, and since whoever closed the bug clearly had no issues running the command on his or her Windows 7 PC, I'm not really sure what to do next in terms of trying to resolve the problem.
>
> Can anyone shed any light on this issue? Is anyone able to reproduce it (only takes 30 seconds, just copy the above line into RGui on Windows 7 and confirm whether a command prompt opens; then, with the first session still open, try the same in a second RGui window)?
>
> Any help or feedback would be appreciated,
>


Does this work for you?

shell("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