Re: [R] Show Progress in loop

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon 10 Oct 2005 - 20:48:56 EST

On Mon, 10 Oct 2005, Philippe Grosjean wrote:

> Hello,
>
> You must explicitly use print(), show() on an object -here, use
> print(i)- in a loop or alternatively, use cat() to display string like:
> cat("loop", i, "\n")
>
> With RGui under Windows, there is another subtility: if you have turn on
> 'Misc -> Buffered output' (it is ON by default), all output are delayed
> until the end of the command processing. You need to use flush.console()
> to tell to print i immediatelly within a loop. The best synthax is
> (since the command is only usable under Windows):

Not so: all systems have it. It is also useful on MacOS X. All this is on the help page.

This is in the rw-FAQ: it seems we have lost the convention of not answering FAQs but referring people to the appropriate FAQ.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Mon Oct 10 21:01:52 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 18:36:28 EST