Dear All, Let a, b and c are?three matrices with same no. of column but different no. of row. a <- matrix(1, 1, 2) b <- matrix(2, 2, 2) c <- matrix(3, 3, 2) Could someone help me to combine these matrices together as a single matrix? Thank you Fir
abc <- rbind(a, b, c) On Tue, Sep 22, 2009 at 1:40 PM, FMH <kagba2006 at yahoo.com> wrote:> Dear All, > > Let a, b and c are?three matrices with same no. of column but different no. of row. > > a <- matrix(1, 1, 2) > b <- matrix(2, 2, 2) > c <- matrix(3, 3, 2) > > Could someone help me to combine these matrices together as a single matrix? > > Thank you > Fir > > > > > ______________________________________________ > 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. >-- Henrique Dallazuanna Curitiba-Paran?-Brasil 25? 25' 40" S 49? 16' 22" O
rbind(a, b, c) another function you might be interested in is cbind. cheers, On Tue, Sep 22, 2009 at 9:40 AM, FMH <kagba2006 at yahoo.com> wrote:> Dear All, > > Let a, b and c are?three matrices with same no. of column but different no. of row. > > a <- matrix(1, 1, 2) > b <- matrix(2, 2, 2) > c <- matrix(3, 3, 2) > > Could someone help me to combine these matrices together as a single matrix? > > Thank you > Fir > > > > > ______________________________________________ > 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. >
is rbind(a,b,c) what you mean? Daniel ------------------------- cuncta stricte discussurus ------------------------- -----Urspr?ngliche Nachricht----- Von: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Im Auftrag von FMH Gesendet: Tuesday, September 22, 2009 12:40 PM An: r-help at r-project.org Betreff: [R] How to combine matrices? Dear All, Let a, b and c are?three matrices with same no. of column but different no. of row. a <- matrix(1, 1, 2) b <- matrix(2, 2, 2) c <- matrix(3, 3, 2) Could someone help me to combine these matrices together as a single matrix? Thank you Fir ______________________________________________ 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.