Message-ID: <BANLkTimLgKFk3T7Vj1wcnFgzEYHRx7jq+A@mail.gmail.com>
Date: 2011-06-04T23:22:12Z
From: Baptiste Auguie
Subject: cbind 3 or more matrices
In-Reply-To: <BANLkTikiatfQWGz1wnAeC9RnTTF4YC9LnA@mail.gmail.com>
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:
> How can I cbind three or more matrices like A,B and C. This does not work:
>
> cbind(A,B,C)
>
>
> --
> Thanks,
> Jim.
>
> ? ? ? ?[[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>