Prof Brian Ripley <[EMAIL PROTECTED]> writes: > You can almost always index in such problems: here is one way. > > rbind(veca,vecb,vecc)[matrix(1:15, 3, byrow=T), ] > > Take it apart of see how it works, if it is not immediately obvious.
Or, a little longer, but perhaps more intuitive: matrix(aperm(array(c(veca,vecb,vecc),c(5,5,3)),c(3,1,2)),15) I.e., convert to array, do generalized transpose, convert back to matrix. Not that I got the index calculations right on first try.... -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
