# NOT RUN {
x <- rnorm(100)
label(x) # returns "x"
label(x, FALSE) # returns NA and issues a warning
label(mtcars$hp) <- "Horsepower"
label(mtcars) # returns "Horsepower" instead of "hp"
label(mtcars, FALSE) # returns NA where no labels are found
label(sleep, FALSE) # returns NA for each variable and issues a warning
# }
Run the code above in your browser using DataLab