powered by
strip_attributes(x)
x
x <- structure(c(foo = 1, bar = 2), some_attr = 3) x2 <- strip_attributes(x) assert_is_identical_to_false(has_names(x2), TRUE) assert_is_null(attr(x2, "some_attr"))
Run the code above in your browser using DataLab