labels_to_level: Labels to level

Description Usage Arguments Value Examples

Description

For use with forcats::fct_relabel.

Usage

1
labels_to_level(.data, .labels)

Arguments

.data

Data frame or tibble.

.labels

Output from extract_variable_label.

Value

Data frame or tibble

Examples

1
2
3
4
5
6
7
8
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 June 11, 2021, 5:17 p.m.