For the following code: I cannot understand why j
does not print on each iteration of the outer loop.
x = 0 for (j in 1:15) { for (i in 1:100000) { x = x + 1 } print(j) }
What R seems to do is run all of this, and print all j
s at the end, and not one by one, like every time the loop repeats.
It seems that j
should print after each iteration of the loop, which I don't see here?
Is there a way to make this so that j
printed on each iteration of the outer loop?
thanks
Akavall
source share