Turn a matrix to a data.frame withe newly defined colnames.

reNameCols(mat, key = "comp")

Arguments

mat

Matrix.

key

String.

Value

Data frame.

Examples

mat <- matrix(1:6, 2, 3)
reNameCols(mat)
reNameCols(mat, key = "PC")