Skip to content
Prev 46800 / 63424 Next

Capture output of install.packages (pipe system2)

Duncan,
On Sep 23, 2013, at 10:20 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:

            
Can you, please, elaborate on how it is that relevant? The linked thread is talking about sink() which it irrelevant here (to quote the original e-mail "Solutions like sink and capture.output don't work because the install.packages calls out to system2 which is executed in a separate process:"). Something I missed?

Re original question: there is keep_outputs which allows to re-direct a copy of the output into a file - at least for the actual install part of it. 
On top of my head for full capture I can only think of custom C code that will re-direct stderr/out FDs as desired (it's really trivial to re-direct to files, for dynamic capture it's a little more involved but there are examples that do that).

Cheers,
Simon