na_pad_matrix: Pad a matrix with additional rows/columns of NA values

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Pad a matrix with additional rows/columns of NA values

Usage

1
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

1
2
3
4
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)

cmap/cmapR documentation built on Oct. 14, 2021, 12:51 a.m.