| StripAttr {DescTools} | R Documentation |
For convenience we sometimes want to strip some or all attributes in a oneliner.
StripAttr(x, attr_names = NULL)
x |
the object whose attributes should be removed. |
attr_names |
a vector with attribute names, which will be removed. Leaving the default to |
the object x without the attributes contained in attr_names
Andri Signorell <andri@signorell.net>
x <- runif(10) attr(x, "some_attr") <- "First attribute" attr(x, "other_attr") <- "Second attribute" # strip all attributes StripAttr(x) # only some StripAttr(x, "other_attr")