powered by
rownames(x) = y
colnames(x) = y
setRowNames(x, names) setColNames(x, names)
matrix
data.frame
character
x
setColNames(matrix(1:4, 2, 2), c("a", "b"))
Run the code above in your browser using DataLab