[R] Printting 'for' and 'while' indices

Ko-Kang Kevin Wang k.wang at auckland.ac.nz
Mon Feb 9 21:31:39 CET 2004


Quoting Marcos Sanches <marcos.sanches at ipsos-opinion.com.br>:

> I mean, I want something like this:
> 
> i<-0
> While(i<100){
> "do a lot of commands"
> "print i"
> i<-i+1
> }
> 
> How do I "print" the "i" at each step?

Is
  print(i)
what you want?

Cheers,

Kevin
------------------------------------------------------------
Ko-Kang Kevin Wang
SLC Statistics Workshops Co-ordinator
Student Learning Centre
University of Auckland
New Zealand

-------------------------------------------------
This mail sent through University of Auckland
http://www.auckland.ac.nz/




More information about the R-help mailing list