with_label: Return an object with a label attribute

View source: R/labels.R

with_labelR Documentation

Return an object with a label attribute

Description

Return an object with a label attribute

Usage

with_label(x, label)

Arguments

x

(ANY)
an object.

label

(string)
label attribute to attach to x.

Value

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.

Examples

x <- with_label(c(1, 2, 3), label = "Test")
obj_label(x)


formatters documentation built on Sept. 13, 2024, 1:10 a.m.