1

I have a list of matrices with an equal number of rows. I want to combine the matrices column-wise (much like the cbind function). Suppose A and B are matrices with an equal number of rows. My list l is l[[1]] = A and l[[2]] = B. What I want is a new matrix M such that M = [A B].

What would be the best way to do this?

Paul
  • 107
  • 4
  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Maybe just `do.call("cbind", l)` – MrFlick Oct 18 '20 at 01:41

0 Answers0