na_pad_matrix {cmapR} | R Documentation |
Pad a matrix with additional rows/columns of NA values
na_pad_matrix(m, row_universe = NULL, col_universe = NULL)
m |
a matrix with unique row and column names |
row_universe |
a vector with the universe of possible row names |
col_universe |
a vector with the universe of possible column names |
a matrix
m <- matrix(rnorm(10), nrow=2) rownames(m) <- c("A", "B") colnames(m) <- letters[1:5] na_pad_matrix(m, row_universe=LETTERS, col_universe=letters)