Re: [R] How to print output during for loops?

2005-10-30 Thread Rau, Roland
Hi, -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martin Lam 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 } yes, should be

[R] How to print output during for loops?

2005-10-29 Thread Martin Lam
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: 1 2 3 4 5 Thanks in advance, Martin __

Re: [R] How to print output during for loops?

2005-10-29 Thread ronggui
for (i in 1:5) { + cat(paste(i,\n)) + } 1 2 3 4 5 for (i in 1:5) { + print(i) + } [1] 1 [1] 2 [1] 3 [1] 4 [1] 5 === 2005-10-29 18:03:13 您在来信中写道:=== 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