Re: [R] storage of matrices of diff dimension together

2012-05-10 Thread Sarah Goslee
Hi Carol, > m1 <- rbind(c(1,2),c(3,4),c(5,6)) > m2 <- rbind(c(1,2),c(5,6)) > mylist <- list(m1) > c(mylist, list(m2)) [[1]] [,1] [,2] [1,]12 [2,]34 [3,]56 [[2]] [,1] [,2] [1,]12 [2,]56 See the examples in ?c for more information. Sarah On Thu,

[R] storage of matrices of diff dimension together

2012-05-10 Thread carol white
Hi, It might be a trivial question but how do you store matrices of different dimensions read from a file or in a loop together? The best solution might be a list but I don't store the first matrix  correctly:  m = rbind(c(1,2),c(3,4),c(5,6)) t=rbind(c(1,2),c(5,6))  l = list(m) > l = list(l,t)