read_sav()1. Read in a labelled SPSS file
df <- haven::read_sav("name-of-import.sav")
2. Read in an SPSS file with NA value labels
df <- haven::read_sav("file.sav", user_na=TRUE)
write_sav()1. Export a labelled SPSS file
haven::write_sav(df, "name-of-export.sav")
characterize()1. Export your variables with the value labels rather than the values
rio::characterize() when exporting
other file types as well such as csv and with using other export
functions such as rio::export()openxlsx::write.xlsx(rio::characterize(df), "name-of-export.xlsx")
Return to Label Data