Rainer M. Krug a écrit :

> Hi
> I have a loop which is doing time consuming calculations and I would 
> like to be able to have some feedback on where it is in it's 
> calculations. I tried to simply show the counter variable in the loop, 
> but id doesn't work as all display seems to be delayed until the loop is 
> completed. Is there any way of displaying the progress of a loop?
> 
> for (i in 2:Result$NoSims)
> {
>       ...
>       i  #<========================Doesn't display in the loop
> }
> 

Hi,
for your last line, use :

print(i);
flush.console();  #<====== now displays in the loop

hih

______________________________________________
[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

Reply via email to