[R] Finding out the number of times a loop has run

2004-11-04 Thread Kevin Wang
Hi, Suppose I have: for(i in 1:10) rnorm(10) (just a fake example, as my actual example is too long) Is it possible to get the loop to print out i each time it has run? Something like: for(i in 1:10) { print(i) rnorm(10) } will only print i after the loop is

Re: [R] Finding out the number of times a loop has run

2004-11-04 Thread Peter Dalgaard
Kevin Wang [EMAIL PROTECTED] writes: Hi, Suppose I have: for(i in 1:10) rnorm(10) (just a fake example, as my actual example is too long) Is it possible to get the loop to print out i each time it has run? Something like: for(i in 1:10) { print(i)

Re: [R] Finding out the number of times a loop has run

2004-11-04 Thread Kevin Wang
Hi, On Thu, 4 Nov 2004, Peter Dalgaard wrote: Kevin, you must have seen this on the list before! Either use flush.console() or turn off the output buffering (Windows FAQ 6.3). Whoopsssorry, I must be tiredneed another cup of coffee. Kev Ko-Kang Kevin

Re: [R] Finding out the number of times a loop has run

2004-11-04 Thread Uwe Ligges
Kevin Wang wrote: Hi, Suppose I have: for(i in 1:10) rnorm(10) (just a fake example, as my actual example is too long) Is it possible to get the loop to print out i each time it has run? Something like: for(i in 1:10) { print(i) rnorm(10) } will only print i