R/labels.R
with_label.Rd
Return an object with a label attribute
with_label(x, label)
(ANY) an object.
ANY
(string) label attribute to attach to x.
string
x
x labeled by label. Note that the exact mechanism of labeling should be considered an internal implementation detail, but the label can always be retrieved via obj_label.
label
obj_label
x <- with_label(c(1, 2, 3), label = "Test") obj_label(x) #> [1] "Test"