A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/WizardMac/ReadStat/issues/287 below:

Invalid file, or file has unsupported features` when using haven package to read .sav file · Issue #287 · WizardMac/ReadStat · GitHub

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:

library(haven)
df <- read_sav(file.choose())

I'm getting the following error:

Parsed 12 of 312 bytes. Remaining bytes: 	Q5_990=4000	Q10_90=4000	Q14_90=4000	Q15_90=4000	Q21_90=4000	Q23_90=4000	Q24_90=4000	Q28_90=4000	HQUAL0=2000	HQUAL8=2000	HQUALG=2000	HQUALO=2000	HQUALW=2000	HQUAL14=2000	HQUAL1C=2000	HQUAL1K=2000	HQUAL1S=2000	HQUAL20=2000	HQUAL28=2000	HQUAL2G=20
[731886-data-Rtest3.zip](https://github.com/WizardMac/ReadStat/files/10140850/731886-data-Rtest3.zip)
00	HQUAL2O=2000	HQUAL2W=2000	HQUAL34=2000	HQUAL3C=2000	
Error: Failed to parse [...].sav: Invalid file, or file has unsupported features.

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4