On Wed, 5 Sep 2007, Gustaf Rydevik wrote:
> On 9/4/07, Werner Wernersen <[EMAIL PROTECTED]> 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()
That is used by capture.output() to capture R output, but this question is
about output that never goes near R.
The answer is in ?system, but might depend on the unstated OS. Arguments
'intern' and 'show.output.on.console' are relevant.
--
Brian D. Ripley, [EMAIL PROTECTED]
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.