Skip to content
Prev 79895 / 398502 Next

How to print output during for loops?

Hi,

I was wondering, if it is possible to print out the
values of variables while you are in a for/while loop?
Like this for example:
  
for (i in 1:5) {
  i
}

So what I want is this as output in the console:
Thanks in advance,

Martin