Skip to content

Instantly share code, notes, and snippets.

@vherolf
Last active May 16, 2024 11:39
Show Gist options
  • Save vherolf/4a494260faf730d43741e3cca9821d52 to your computer and use it in GitHub Desktop.
Save vherolf/4a494260faf730d43741e3cca9821d52 to your computer and use it in GitHub Desktop.
Convert SPSS sav to csv with R
## install haven library first.
# install.packages("haven")
#
## run with
# Rscipt convert.R
#
library("haven")
dataframe <- read_sav("input.sav")
dataframe
write.csv(dataframe, "output.csv")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment