Re: [Rd] suppressing stderr output from system() calls

2011-10-05 Thread Mark Cowley
Thanks Martin, Simon and Brian, They're all good suggestions for code that I write, however how can I suppress stderr from pre-existing code. For instance, install.packages has 3 system calls. Perhaps a better worded question would be: how can I redirect the output of this command: install.pack

Re: [Rd] suppressing stderr output from system() calls

2011-10-05 Thread Martin Morgan
On 10/05/2011 02:36 AM, Mark Cowley wrote: Dear list, I'm trying to suppress/redirect/squash the output from commands like install.packages, or download.file. The problem is that none of: sink(..., type="message"), sink(..., type="output"), capture.output, suppressMessages are quite doing the

Re: [Rd] suppressing stderr output from system() calls

2011-10-05 Thread Prof Brian Ripley
See ?system2 to answer your subject line. But you seem confused about external programs and R's own stdout() connection. Have you read the R News article on connections? On Wed, 5 Oct 2011, Mark Cowley wrote: Dear list, I'm trying to suppress/redirect/squash the output from commands like in

Re: [Rd] suppressing stderr output from system() calls

2011-10-05 Thread Simon Urbanek
See ?system, in particular ignore.stdout, ignore.stderr and intern. Cheers, Simon On Oct 5, 2011, at 5:36 AM, Mark Cowley wrote: > Dear list, > I'm trying to suppress/redirect/squash the output from commands like > install.packages, or download.file. The problem is that none of: sink(..., > t

[Rd] suppressing stderr output from system() calls

2011-10-05 Thread Mark Cowley
Dear list, I'm trying to suppress/redirect/squash the output from commands like install.packages, or download.file. The problem is that none of: sink(..., type="message"), sink(..., type="output"), capture.output, suppressMessages are quite doing the trick. Output gets written to the stderr stre