dimnames {admisc} | R Documentation |
Set matrix row or column names
Description
Set matrix row or column names without copying, especially useful for (very) large matrices.
Usage
setColnames(matrix, colnames)
setRownames(matrix, rownames)
setDimnames(matrix, nameslist)
Arguments
matrix |
An R matrix |
colnames |
Character vector of column names |
rownames |
Character vector of row names |
nameslist |
A two-component list containing rownames and colnames |
Author(s)
Adrian Dusa
Examples
mat <- matrix(1:9, nrow = 3)
setDimnames(mat, list(LETTERS[1:3], letters[1:3]))
[Package admisc version 0.35 Index]