# NOT RUN {
# read the data and variable labels
#mydata <- rd("http://lessRstats.com/data/employee.xlsx")
#mylabels <- vl("http://lessRstats.com/data/employee_lbl.xlsx")
# variable label as the title of a graph for non-lessR functions
# base R
#hist(mydata$Salary, xlab=label(Salary))
# ggplot2
#ggplot(mydata, aes(Salary)) + geom_histogram(binwidth=10000) + labs(x=label(Salary))
# assign a new label for the variable Years in mydata
#mydata <- label(Years, "Years Worked")
# verify
#label(Years)
# or view all variable labels in mydata
#db()
#mydata <- Read("Employee", in.lessR=TRUE)
# specify a label of variable in a data frame other than mydata
#myd <- Subset(Gender=="M")
#myd <- label(Gender, "Only is Male", data=myd)
#db(myd)
# }
Run the code above in your browser using DataLab