Restore labels from the codebook store in the codebook attribute.
Source:R/labels.R
labs_restore.Rd
Details
You can store labels before mutate operations by calling labs_store.
Examples
library(dplyr)
#>
#> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’:
#>
#> filter, lag
#> The following objects are masked from ‘package:base’:
#>
#> intersect, setdiff, setequal, union
library(volker)
volker::chatgpt |>
labs_store() |>
mutate(sd_age = 2024 - sd_age) |>
labs_restore() |>
tab_metrics(sd_age)
#>
#>
#> |Age | value|
#> |:------|------:|
#> |min | 1956|
#> |q1 | 1972|
#> |median | 1986|
#> |q3 | 1997|
#> |max | 2006|
#> |mean | 1984.3|
#> |sd | 13.8|
#> |n | 101|