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

From: IAIN GALLAGHER <iaingallagher_at_btopenworld.com>
Date: Sun 30 Oct 2005 - 21:54:38 EST


for (i in 1:5) {print(i)}

Cheers

Iain

> 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
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sun Oct 30 22:06:36 2005

This archive was generated by hypermail 2.1.8 : Mon 31 Oct 2005 - 01:24:06 EST