Re: [R] select elements and transpose

2009-12-30 Thread Dennis Murphy
Hi: An alternative is the following: # This regenerates your dataset: xx <- list(matrix(1:9, nrow = 3, byrow = TRUE), matrix(10:18, nrow = 3, byrow = TRUE), matrix(19:27, nrow = 3, byrow = TRUE)) # Flatten matrix elements of each component into vectors: xxf <- lapply(xx,

Re: [R] select elements and transpose

2009-12-30 Thread Henrique Dallazuanna
If I understand, you can try this: array(do.call(rbind, xx), c(3, 3, 3)) On Wed, Dec 30, 2009 at 11:45 AM, Muhammad Rahiz wrote: > Hi all, > > Given the following, > >> xx > [[1]] >    V1 V2 V3 > [1,]  1  2  3 > [2,]  4  5  6 > [3,]  7  8  9 > [[2]] >    V1 V2 V3 > [1,]10 11  12 > [2,]13 14  15