Closed
Description
I caught this in #140 but have not yet discovered the cause of the problem.
> num <- labelled(c(1, 2), c(a = 1, b = 3))
> num
<Labelled>
[1] 1 2
Labels:
value label is_na
1 a FALSE
3 b FALSE
> roundtrip_var(num)
<Labelled>
[1] 1 2
Labels:
value label is_na
0 a FALSE
0 b FALSE
I opened the file in Stata and verified that the labels are not written correctly:
. label list
x..i..:
0 a
0 b
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.
Metadata
Metadata
Assignees
Labels
No labels