dat <- read.dta13(system.file("extdata/statacar.dta", package="readstata13"),
convert.factors=FALSE)
# display variable labels
varlabel(dat)
# display german variable labels
varlabel(dat, lang="de")
# display german variable label for brand
varlabel(dat, var.name = "brand", lang="de")
# define new variable labels
varlabel(dat) <- letters[1:ncol(dat)]
# display new variable labels
varlabel(dat)
Run the code above in your browser using DataLab