-
Notifications
You must be signed in to change notification settings - Fork 70
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
Missing value support for integers in SPSS #251
Comments
From your perspective, would it be sufficient to change the
? |
Yep that's perfect, thank you! |
evanmiller
added a commit
that referenced
this issue
Aug 4, 2021
Please try the latest |
That works perfectly, thanks again |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Another one from haven! 🙂
From tidyverse/haven#596.
Currently missing value support for SPSS is limited to doubles and strings because of an explicit type check in the functions that write out the missing values info:
ReadStat/src/spss/readstat_sav_write.c
Lines 244 to 259 in a8e6705
ReadStat/src/spss/readstat_sav_write.c
Lines 346 to 353 in a8e6705
It seems like it should be OK to just use the double methods for all non-string values (since integers and 32 bit floats are all converted to doubles in SPSS output anyway) - it probably just needs a change to the conditional logic in these functions and maybe a couple of additional readstat_add_missing_* functions in here to deal with other types:
https://github.com/WizardMac/ReadStat/blob/a8e6705453f0e610a698a4d98b3dfa3087cf4b28/src/readstat_variable.c
I can chuck together a PR if you're happy with this approach?
The text was updated successfully, but these errors were encountered: