# NOT RUN {
# import SPSS data set. uses haven's read function
mydat <- read_spss("my_spss_data.sav")
# use haven's read function, convert atomic to factor
mydat <- read_spss("my_spss_data.sav", convert.factors = TRUE)
# retrieve variable labels
mydat.var <- get_label(mydat)
# retrieve value labels
mydat.val <- get_labels(mydat)
# }
Run the code above in your browser using DataLab