An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110412/7e3dec24/attachment.pl>
Merge matrix
4 messages · pankaj borah, Kehl Dániel, Kevin E. Thorpe +1 more
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110412/a80c204d/attachment.pl>
On 04/12/2011 10:54 AM, pankaj borah wrote:
I have two matrices A and B
dim (A)
[1] 30380 104
dim(Bt)
[1] 30380 63 I want to combine both A and B to matrix C where
dim(C)
[1] 30380 167 How do I do that ?
Assuming that Bt is the transpose of B and you want C = [A|Bt] you could do: C <- cbind(A,t(B))
Regards, Pankaj Barah Department of Biology, Norwegian University of Science& Technology (NTNU) Realfagbygget, N-7491 [[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.
Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.thorpe at utoronto.ca Tel: 416.864.5776 Fax: 416.864.3016
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110413/0999037e/attachment.pl>