You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've come across this problem several times now with different data sets that can't be read in with haven package. However, I'm posting it here, because I assume that the problem is with the underlying parsing from ReadStat.
Using the attached data set once it is unpacked (sorry for the file size!) and reading it in with haven in R:
The problem is probably again with some weird or superlong character variables (maybe it's also connected to this multibyte problem?) that SPSS would handle without issues, but haven (or other tools do not).
BTW: When I open the file in SPSS, save it and then try to open it again with haven, it works just fine.
According to that document, the key=value pairs in a Very Long String Record are delimited by a zero byte followed by a tab character. In this file, the zero byte is missing. Fortunately, this should be an easy fix.
Great, thanks for adding the fix. So we probably need to wait until you officially release an update and then I probably need to nudge the haven devs about it so that it does find its way to the R package.
@deschen1 Yes. You can also try patching locally but it may be more trouble than it's worth. I'll aim to have an official ReadStat update in about a month.
I've come across this problem several times now with different data sets that can't be read in with
haven
package. However, I'm posting it here, because I assume that the problem is with the underlying parsing from ReadStat.Using the attached data set once it is unpacked (sorry for the file size!) and reading it in with haven in R:
I'm getting the following error:
The problem is probably again with some weird or superlong character variables (maybe it's also connected to this multibyte problem?) that SPSS would handle without issues, but haven (or other tools do not).
BTW: When I open the file in SPSS, save it and then try to open it again with
haven
, it works just fine.731886-data-Rtest3.zip
The text was updated successfully, but these errors were encountered: