mark salsburg <[EMAIL PROTECTED]> writes: > Can someone please refer me to a function or method that resolves this > structuring issue: > > I have two matrices with identical colnames (89), but varying number > of observations: > > matrix A matrix B > > 217 x 89 16063 x 89 > > I want to creat one matrix C that has both matrices adjacent to one > another, where matrix A is duplicated many times to create the same > row number for matrix B, i.e. 16063. > > matrixA matrix B > matrixA > matrixA > > so matrix C will be 16063 x 178 > > I've tried cbind() and merge() with no success..
A: What the !!##"¤ does this have to do with the subject line? B: This should do it: cbind(A[rep(1:217,length=16063),], B) -- O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
