Skip to content
Prev 261922 / 398502 Next

cbind 3 or more matrices

A, B, C should have the same number of rows.

mlist = replicate(3, matrix(rnorm(6), 2), simplify=FALSE)
names(mlist) = LETTERS[seq_along(mlist)]
with(mlist, cbind(A,B,C))

or,

do.call(cbind, mlist)

HTH,

baptiste
On 5 June 2011 11:14, Jim Silverton <jim.silverton at gmail.com> wrote: