Simple tools to add and remove attributes, both normally and in-place.
To remove specific attributes, set those attributes to NULL
.
attrs_add(x, ..., .set = FALSE, .args = NULL)attrs_rm(x, .set = FALSE)
The object x
with attributes removed or added.
Object to add/remove attributes.
Named attributes, e.g 'key = value'.
Should attributes be added in-place without shallow-copying x
?
Default is FALSE
.
An alternative to ...
for easier programming with lists.
shallow_copy