Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.SOL.4.44.0306040801190.21132-100000@mspacman.gpcc.itd.umich.edu>
Date: 2003-06-04T12:02:11Z
From: Thomas W Blackwell
Subject: (no subject)
In-Reply-To: <F062093E456F8C4A9566C5CA59726C6E1972F3@EMAIL.hci.utah.edu>

I think cat() will print immediately from inside a loop.

-  tom blackwell  -  u mihigan medical school  -  ann arbor  -

On Tue, 3 Jun 2003, Gilda Garibotti wrote:

> Hi,
> I would like to know if it is possible to get printed output while a loop is taking place.
> Example:
> for(i in 1:10){
>  print(i)
>  some long process
> }
>
> This will print the values of i only after the loop is finished, what I would like is to
> see them when the process enters the i-th iteration to keep track of how the
> program is running.
>
> Thank you,
> Gilda
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>