[R] printing a variable during a loop

Antonio Olinto aolinto_r at bignet.com.br
Thu Oct 21 20:05:37 CEST 2010


Hello,

About looping, consider the example:

for (i in 1:23194) {
dat.stat[i,c(2:8)]<-quantile(dat.bat[BL==block[i],2],prob=c(0,0.025,0.25,0.5,0.75,0.975,1))
print(i)
}

I'd like to have the value of "i" printed for each loop (step). As I  
could see the values of "i" are shown on screen only after all the  
work is done.

Thanks in advance for any suggestion.

Best regards,

Antonio

----------------------------------------------------------------
Webmail - iBCMG Internet
http://www.ibcmg.com.br



More information about the R-help mailing list