Align the rows and columns of two (or more) matrices

.align_matrices(m1, m2, ..., L = NULL, na.pad = TRUE, as.3D = TRUE)

Arguments

m1

a matrix with unique row and column names

m2

a matrix with unique row and column names

...

additional matrices with unique row and column names

L

a list of matrix objects. If this is given, m1, m2, and ... are ignored

na.pad

boolean indicating whether to pad the combined matrix with NAs for rows/columns that are not shared by m1 and m2.

as.3D

boolean indicating whether to return the result as a 3D array. If FALSE, will return a list.

Value

an object containing the aligned matrices. Will either be a list or a 3D array