search for: dumdat

Displaying 1 result from an estimated 1 matches for "dumdat".

Did you mean: sumdat
2011 Jul 21
2
Printing the loop number for each iteration
Hi all, I have a lengthy 'for' loop and for each loop I want to track the iteration number that is currently going on. For this, I have tried following: > for (i in 1:10) { + DumDat <- rnorm(1000) + cat("iteration:", i, " \n") + } iteration: 1 iteration: 2 iteration: 3 iteration: 4 iteration: 5 iteration: 6 iteration: 7 iteration: 8 iteration: 9 iteration: 10 However when I run this loop, all iteration numbers are show...