-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
write_sav() should set "Missings" to "none" in SPSS data file #42
Comments
Can you please post the data publicly somewhere and link to here? That makes life easier for me. |
btw, I found this "bug" because I saved data to SPSS and did some more edits in the SPSS file (within the SPSS application) and SPSS failed to save the file to disk- after I changed the empty "Missing" into "None", saving the file worked. |
SPSS file with haven: https://www.dropbox.com/s/o0lrclke0vh9ew4/test_haven.sav?dl=0 |
Thanks @sjPlot. See if this commit fixes the issue: I apparently misunderstood what the missing-values field was for -- it's for the user to define (real) missing values, and doesn't need the system-missing NaN value in there. |
I can't update your library inside the haven-package - when I manually replace your C-src-files inside the haven-source-code and zip the haven package, the package won't install. I'll give you the feedback when @hadley has updated your library here. |
@sjPlot just updated readstat so you can try it out |
Yes, this seems to fix the issue! Thanks! |
When writing data with missings to SPSS, the "Missing" object in the SPSS data file is empty. It better should be set to "None" (i.e., missing values are not assigned with a specific numeric value of the variable).
See screenshots. Sample data set will be sent via mail...
The text was updated successfully, but these errors were encountered: