dimnames(x) dimnames(x) <- value
To explicitly delete the dimnames attribute of an array (or matrix), use dimnames(x)<-NULL. You may not remove the dimnames of a data frame and the row and column names that you give it must be unique and of non-zero length.
The dimnames of an object is a list whose length is length(dim(x)). The ith element of dimnames(x) is either of length 0 (not allowed for data frames) or is a vector of dim(x)[i] character strings, and in the latter case should be thought of as a set of labels for the ith dimension of x.
dimnames(iris)[[3]] # iris speciesdimnames(my.matrix) <- list(NULL, c("red", "brown", "purple", "silver"))