[R] a loop to chang data matrix name

Yu-Ling Wu yuling5 at yahoo.com
Fri Jan 26 23:17:32 CET 2001


Hi,

I have 50 data matrix x1 ~ x5. I want to write a loop
to check the number of 
rows for each data matrix. How to make the data matrix
name (numerical part)
increase by 1 each time it loops?

That is, 
loop1:  nrow(x1)
loop2: nrow(x2)
....
loop50: nrow(x50)

---------------------------------------------------------------
for (i in 1:50) {
   if nrow( xi ) > 20    <=== how to make this work?
      do someting ......
}
--------------------------------------------------------------

Thanks,
Yu-Ling Wu

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list