Join GitHub today
write_dta: numeric labelleds not written correctly #144
I caught this in #140 but have not yet discovered the cause of the problem.
I opened the file in Stata and verified that the labels are not written correctly:
It might be a bug in ReadStat, since the label-writing code in DfWriter seems to be basically the same as the code for integer labelleds, which do work fine.
Stata only supports value labels for integers:
You could try creating the label set for integer values (
You're right. I thought I had tried to label a double in Stata, but apparently I did not.
Applying an integer label to a double variable does work, but is probably not very useful.
The easiest way to fix this would be to warn and discard labels when writing numerics. Writing only those labels with integer values could be very surprising for users.