rlang (version 0.0.0.9000)

with_attributes: Add attributes to an object.

Description

Add attributes to an object.

Usage

with_attributes(.x, ..., .attrs = list())

Arguments

.x
An object to decorate with attributes.
..., .attrs
A list of named attributes.

Examples

Run this code
with_attributes(letters, class = "my_chr", names = 1:26)

attrs <- list(class = "my_chr", names = 1:26)
with_attributes(letters, .attrs = attrs)

Run the code above in your browser using DataCamp Workspace