Learn R Programming

cheapr (version 1.2.0)

attrs: Add and remove attributes

Description

Simple tools to add and remove attributes, both normally and in-place. To remove specific attributes, set those attributes to NULL.

Usage

attrs_add(x, ..., .set = FALSE, .args = NULL)

attrs_rm(x, .set = FALSE)

Value

The object x with attributes removed or added.

Arguments

x

Object to add/remove attributes.

...

Named attributes, e.g 'key = value'.

.set

Should attributes be added in-place without shallow-copying x? Default is FALSE.

.args

An alternative to ... for easier programming with lists.

See Also

shallow_copy