# NOT RUN {
x <- 1:10
x <- set_label(x, "Integers")
get_label(x)
y <- letters
attr(y, "label") # NULL
get_label(y) # "y"
# Set labels for variables in a data frame
mtcars2 <-
set_label(mtcars,
am = "Automatic / Manual",
mpg = "Miles per Gallon",
gear = "Number of gears")
get_label(mtcars2)
# }
Run the code above in your browser using DataLab