View source: R/generate_modifiers.R
| convert_factor | R Documentation |
Convert labelled factors to regular factors
convert_factor(data)
data |
A data frame, tibble, or |
A data frame with labelled factors converted to regular factors.
df <- data.frame(
category = haven::labelled(
c(1, 2, 3),
c("One" = 1, "Two" = 2, "Three" = 3)
)
)
df_converted <- convert_factor(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.