na_pad_matrix {cmapR} | R Documentation

## Pad a matrix with additional rows/columns of NA values

### Description

Pad a matrix with additional rows/columns of NA values

### Usage

    na_pad_matrix(m, row_universe = NULL, col_universe = NULL)

### Arguments

`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

### Value

a matrix

### Examples

    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)

[Package cmapR version 1.2.1 Index]