Skip to content

Instantly share code, notes, and snippets.

View DrDanL's full-sized avatar

Dan Leightley DrDanL

View GitHub Profile
@DrDanL
DrDanL / convert.R
Last active February 11, 2018 18:12 — forked from igorbrigadir/convert.R
Convert SPSS SAV or DTA data files to CSV with R
library(foreign)
# SAV file?
write.table(read.spss("spss_data.sav"), file="from_sav_data.csv", quote = FALSE, sep = ",")
# DTA file?
write.table(read.dta("spss_data.dta"), file="from_dta_data.csv", quote = FALSE, sep = ",")