Some functions don't work with labelled variables. As a solution, this function can be used to drop labels (and all other attributes) from one or more variables within a data frame, from all variables if none are specified, or from a vector directly.
Examples
if (FALSE) { # \dontrun{
# Dataset-level: Remove labels from ALL variables
df |> drop_label()
# Dataset-level: Remove labels from specific variables
df |> drop_label(employment, starts_with("dem_"))
# Variable-level: Use inside mutate
df |> mutate(name_first = drop_label(name_first))
# Variable-level: Use with across()
df |> mutate(across(c(age, income), drop_label))
} # }
