[R] How to define a number of matrices through loops

From: Amarjit Singh Sethi <set_alt_at_yahoo.co.in>
Date: Sat, 09 Apr 2011 08:52:58 +0530 (IST)


Hi all
I need to deal with a number (say, 5) of diferent ordered matrices  simultaneously in my computational work. I tried to define these matrices through looping, but got an error message:

row <- c(3,4,6,4,5)
mt <- c()
for (i in 1:5){ 
mt[i] <- matrix(nrow=row[i],ncol=4)
}
mt

Kindly help

Yours
ajss



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat 09 Apr 2011 - 03:54:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 09 Apr 2011 - 06:20:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive