[R] capture.out(system())?

Werner Wernersen pensterfuzzer at yahoo.de
Thu Sep 6 09:34:54 CEST 2007


Thank you very much, Professor Ripley!
I am using Windows 2000 and the "intern=T" argument of
system() did exactly what I needed: Now system()
returns the output of the external program as an
object.

Thanks again,
  Werner


--- Gustaf Rydevik <gustaf.rydevik at gmail.com> schrieb:

> On 9/4/07, Werner Wernersen <pensterfuzzer at yahoo.de>
> wrote:
> > Hi,
> >
> > I am trying to capture the console output of
> program I
> > call via system() but that always returns only
> > character(0).
> >
> > For example:
> > capture.output(system("pdflatex out.tex") )
> >
> > will yield:
> > character(0)
> >
> > and the output still written to the R console.
> >
> > Is there a command for intercepting this output?
> >
> > Thank you!
> >   Werner
> >
> 
> ?sink()
> 
> -- 
> Gustaf Rydevik, M.Sci.
> tel: +46(0)703 051 451
> address:Essingetorget 40,112 66 Stockholm, SE
> skype:gustaf_rydevik
>



More information about the R-help mailing list