[R] Printting 'for' and 'while' indices

Andy Bunn abunn at montana.edu
Mon Feb 9 20:54:02 CET 2004


Try this. Look at ?flsuh.console if you are on windows

HTH, Andy

#~~~~~~~~~~~~~~~~~~~~~~~~
i<-0
while(i<100){
## "do a lot of commands"

##"print i"
cat(i, "\n")

## if using windows
flush.console()

i<-i+1
}




More information about the R-help mailing list