[R] a loop to chang data matrix name

About this list Date view Thread view Subject view Author view Other groups

Subject: [R] a loop to chang data matrix name
From: Yu-Ling Wu (yuling5@yahoo.com)
Date: Sat 27 Jan 2001 - 08:17:32 EST


Message-ID: <20010126221732.6330.qmail@web11504.mail.yahoo.com>

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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Thu 01 Feb 2001 - 16:14:44 EST