This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# package dependency | |
library(haven) | |
path_in = "new_EB with more var_2004-2016.dta" | |
out_tsv = "new_EB.tsv" | |
out_sav = "new_EB.sav" | |
# name repair shows the issue with _merge | |
x = haven::read_dta(p, .name_repair = "universal") | |
names(x)[ names(x) == "._merge" ] = "MERGEVAR" | |
haven::write_tsv(x, out_tsv) # TSV | |
haven::write_sav(x, out_sav) # SAV |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment