[R] composed matrices

Dimitris Rizopoulos dimitris.rizopoulos at med.kuleuven.be
Thu Mar 29 13:16:37 CEST 2007


try this:

A1 <- matrix(1:20, 5, 4)
B1 <- matrix(1:15, 5, 3)
A2 <- matrix(1:8, 2, 4)
B2 <- matrix(1:6, 2, 3)
#####################
rbind(cbind(A1, B1), cbind(A2, B2))


I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
     http://www.student.kuleuven.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: "Eva Ubl" <eva.ubl at univie.ac.at>
To: <r-help at stat.math.ethz.ch>
Sent: Thursday, March 29, 2007 1:10 PM
Subject: [R] composed matrices


>I have just started programming in R and so my question might be 
>basic but
> I cant find it in the manual
> I have four matrices A,B,C and D and want them to compose in a big 
> matrix X
> with A in the upper left corner, B in the right upper corner, c 
> below A
> and D below B.
> Thanks for your help
> eva
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
> 


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



More information about the R-help mailing list