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