Labelled are used to get right labels when saving to spss using package haven

mutate_label(x)

Arguments

x

Vector

Value

Labelled

Examples

df <- data.frame(cars = 1:3) attr(df$cars, "map") <- data.frame(levels = 1:3, labels = c("Volvo", "Saab", "Opel")) df <- dplyr::mutate_if(df, check_attr, mutate_label)