powered by
Get the names of the attributes of an object
attrnames(object)
Vector of character strings with the names of the attributes.
Any object
It just does names(attributes(object)).
names(attributes(object))
x <- matrix(1:100, ncol=5) colnames(x) <- LETTERS[1:5] attrnames(x)
Run the code above in your browser using DataLab