Closed carecodeconnect closed 1 year ago
Hi,
Sorry, but I'm not aware of such a limitation.
The issue is related to the way data is imported by haven
. You should raise the issue there: https://github.com/tidyverse/haven or in ReadStat
https://github.com/WizardMac/ReadStat the tool used by haven
for importing SPSS data.
Unfortunately, there is nothing I can do at labelled
level.
Thanks a lot for your quick reply!
I've reported a new issue on the haven
repository.
Thanks for writing such a great package!
I have imported an SPSS
.sav
file into R usinghaven::read_sav
and have noticed that long variable labels get truncated (to between around 100-140 characters).I seem to be unable to read the entire original variable labels as they appeared in SPSS. This is the case whether I use
var_label(data$variable)
,attr(data$variable, "label")
, orstr(data$label)
. Using the latter command returns__truncated__
following the label character.The same thing happens when I import the
.sav
file into Python usingpyreadstat
andpandas.read_spss
Do you know if there is a maximum character length when importing variable labels from
.sav
files into R or Python? Is there a way to read these that is not truncated?Thanks in advance for your help!