rownames(x) rownames(x) <- namevector
rownames can be used to retrieve or set the row labels of a matrix.