Apply a function to modify the labels of selected columns in a survey tibble.
Usage
step_relabel(x, .cols = everything(), .fn = NULL, snapshot_data = FALSE)Arguments
- x
A survey tibble
- .cols
Columns to relabel. Can use tidyselect syntax. Defaults to all columns.
- .fn
A function that takes a character string (the current label) and returns a character string (the new label). If NULL, a default function is used to clean up labels.
- snapshot_data
Logical. If
TRUE, a snapshot of the data is taken. IfFALSE, snapshot without data is taken. IfNULL, no snapshot is taken.
Examples
if (FALSE) { # \dontrun{
data("srv_example", package = "g6tr.survey")
x <- srv_example |>
step_relabel(starts_with("s_"), toupper)
get_lineage(x, 0, "info")
} # }