powered by
rmAttr(x, except = "class")
NULL
x
attributes
x <- table(sample(letters, 1e3, TRUE)) (x1 <- rmAttr(x)) class(x1 <- rmAttr(x)) # still a table, without names (x2 <- rmAttr(x, NULL)) class(x2) # integer vector
Run the code above in your browser using DataLab