labels_to_level: Labels to level

labels_to_levelR Documentation

Labels to level

Description

For use with forcats::fct_relabel.

Usage

labels_to_level(.data, .labels)

Arguments

.data

Data frame or tibble.

.labels

Output from extract_variable_label.

Value

Data frame or tibble

Examples

library(dplyr)
vlabels = extract_variable_label(colon_s)
colon_s %>%
 select(sex.factor, obstruct.factor) %>% 
 tidyr::gather() %>% 
 mutate(
  key = forcats::fct_relabel(key, labels_to_level, vlabels)
 )

finalfit documentation built on Sept. 11, 2024, 9:01 p.m.