library(dplyr)
mtcars %>%
mutate(mpg2=set_label(mpg, "Miles per gallon"),
mpg3=mpg %>% copy_label_from(mpg2)) %>%
crosstable(c(mpg, mpg2, mpg3))
mtcars %>%
copy_label_from(mtcars2) %>%
crosstable(c(mpg, vs))
mtcars2 %>% set_label(toupper) %>% get_label()
Run the code above in your browser using DataLab