[R] applying cbind (or any function) across all components in a list

Hans Thompson hans.thompson1 at gmail.com
Fri May 25 00:19:12 CEST 2012


Yes. This gives me:

     [,1] [,2] [,3] [,4]
[1,]    1    2    3    4
[2,]    2    3    4    5
     [,1] [,2] [,3] [,4]
[1,]    6    7    8    9
[2,]    7    8    9   10

BUT, how can I have it still within components like

[[1]]
     [,1] [,2] [,3] [,4]
[1,]    1    2    3    4
[2,]    2    3    4    5

[[2]]
     [,1] [,2] [,3] [,4]
[1,]    6    7    8    9
[2,]    7    8    9   10

How should I have phrased my question to be specific to this result?

Thanks.

--
View this message in context: http://r.789695.n4.nabble.com/applying-cbind-or-any-function-across-all-components-in-a-list-tp4631128p4631258.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list