Re: [R] Show Progress in loop

From: Prof Brian Ripley <>
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,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide!
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