lbl: Make a label placeholder object

Description Usage Arguments Value See Also Examples

View source: R/lbl_helpers.r

Description

Helper to make a placeholder for a label-value pair.

Usage

1

Arguments

...

Either one or two arguments, possibly named .val and .lbl. If a single unnamed value, represents the label, if 2 unnamed values, the first is the value and the second is the label.

Value

A label_placeholder object, useful in functions like lbl_add

See Also

Other lbl_helpers: lbl_add(), lbl_clean(), lbl_collapse(), lbl_define(), lbl_na_if(), lbl_relabel(), zap_ipums_attributes()

Examples

1
2
3
4
5
6
x <- haven::labelled(
  c(100, 200, 105, 990, 999, 230),
  c(`Unknown` = 990, NIU = 999)
)

lbl_add(x, lbl(100, "$100"), lbl(105, "$105"), lbl(200, "$200"), lbl(230, "$230"))

ipumsr documentation built on July 22, 2020, 1:06 a.m.