labs_restore {volker} | R Documentation |
Restore labels from the codebook store in the codebook attribute.
Description
Usage
labs_restore(data, cols = NULL, values = TRUE)
Arguments
data |
A data frame. |
cols |
A tidyselect column selection. |
values |
If TRUE (default), restores value labels in addition to item labels. Item labels correspond to columns, value labels to values in the columns. |
Details
You can store labels before mutate operations by calling labs_store.
Value
A data frame.
Examples
library(dplyr)
library(volker)
volker::chatgpt |>
labs_store() |>
mutate(sd_age = 2024 - sd_age) |>
labs_restore() |>
tab_metrics(sd_age)
[Package volker version 2.0.1 Index]