lbl_add | R Documentation |
Add labels for values that don't already have them.
lbl_add(x, ...) lbl_add_vals(x, labeller = as.character, vals = NULL)
x |
A |
... |
Labels formed by |
labeller |
A function that takes a single argument of the values and returns the
labels. Defaults to |
vals |
Vector of values to be labelled. NULL, the default labels all values that are in the data, but aren't already labelled. |
A haven::labelled vector
Other lbl_helpers:
lbl_clean()
,
lbl_collapse()
,
lbl_define()
,
lbl_na_if()
,
lbl_relabel()
,
lbl()
,
zap_ipums_attributes()
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")) lbl_add_vals(x) lbl_add_vals(x, ~paste0("$", .)) lbl_add_vals(x, vals = c(100, 200))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.