Learn R Programming

volker (version 2.1.0)

labs_restore: Restore labels from the codebook store in the codebook attribute.

Description

[Experimental]

Usage

labs_restore(data, cols = NULL)

Value

A data frame.

Arguments

data

A data frame.

cols

A tidyselect column selection.

Details

You can store labels before mutate operations by calling labs_store.

Examples

Run this code
library(dplyr)
library(volker)

volker::chatgpt |>
  labs_store() |>
  mutate(sd_age = 2024 - sd_age) |>
  labs_restore() |>
  tab_metrics(sd_age)

Run the code above in your browser using DataLab