Skip to content
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

Closed
sjPlot opened this issue Mar 9, 2015 · 8 comments
Closed

write_sav() should set "Missings" to "none" in SPSS data file #42

sjPlot opened this issue Mar 9, 2015 · 8 comments

Comments

@sjPlot
Copy link

sjPlot commented Mar 9, 2015

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...

clipboard01

@hadley
Copy link
Member

hadley commented Mar 9, 2015

Can you please post the data publicly somewhere and link to here? That makes life easier for me.

@sjPlot
Copy link
Author

sjPlot commented Mar 9, 2015

@sjPlot
Copy link
Author

sjPlot commented Mar 9, 2015

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.

@sjPlot
Copy link
Author

sjPlot commented Mar 10, 2015

@evanmiller
Copy link
Collaborator

Thanks @sjPlot. See if this commit fixes the issue:

WizardMac/ReadStat@6362ac6

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.

@sjPlot
Copy link
Author

sjPlot commented Mar 11, 2015

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.

@hadley
Copy link
Member

hadley commented Mar 13, 2015

@sjPlot just updated readstat so you can try it out

@sjPlot
Copy link
Author

sjPlot commented Mar 13, 2015

Yes, this seems to fix the issue! Thanks!

@sjPlot sjPlot closed this as completed Mar 13, 2015
@lock lock bot locked and limited conversation to collaborators Jun 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants