-
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
Reading Stata value labels fails for all value labels prior to an empty value label #219
Comments
Can you please provide a copy of |
Yes, I have attached four save example_input_14
saveold example_input_13, version(13)
saveold example_input_12, version(12)
saveold example_input_11, version(11)
|
See #219. This should fix empty value labels for DTA versions 117 and later
Thanks. See if this commit fixes things: |
I get an error on every DTA file with 1.1.5-rc0. % readstat example_input_16.dta example_output_16.dta
Error beginning row: Unable to write data
Converted 1 variables and 1 rows in 0.00 seconds
Error processing example_input_16.dta: The parsing was aborted (callback returned non-zero value) |
Please try the |
Ah, right, I just saw 93e33e2 |
Yes, this fix works for me, with no immediately apparent side effects. I tested example DTAs from Stata versions 11 through 16, as well as my own "in the wild" problematic example, and that reported at tidyverse/haven#551. Thank you for your prompt fix! Will this make it into 1.1.5? |
Yes |
Reported as tidyverse/haven#551
Variables whose value labels appear on the label list prior to one with an empty value label are not assigned their value labels.
Step 1:
Step 2:
readstat example_input.dta example_output.dta
Actual
example_output.dta
:Expected
example_output.dta
:(Minor detail: the blueness of the
0
indicates the presence of an [empty] value label for variabley
; I have no strong opinion on whether this value label should be preserved in the output file.)The text was updated successfully, but these errors were encountered: