I have two matrices of arbitrary sizes, e.g. matrix 1 (n * m) and matrix 2 (k * l). Is there a (convenient) way in R to cbind
them row-by-row, to form a (n * k) * (m + l) matrix where each row of matrix 1 has a chance to be cbind
ed to each row of matrix 2? It is a complete row-by-row combination so the order does not matter.
For example, is there a function f
such that:
please click to view
Thanks!