tidyverse / haven

Read SPSS, Stata and SAS files from R
https://haven.tidyverse.org
Other
424 stars 117 forks source link

Incorrect v8 xpt files #756

Open DirkDeWachter opened 5 months ago

DirkDeWachter commented 5 months ago

BUG. In version 8 xpt files, the record count is missing in the OBSV8 header. As a result SAS 9.4 opens the xpt-file and creates the dataset with all the variables but does not read any records.

Source file haven/src/readstat/sas/readstat_xport_write.c line 458 Function xport_write_obs_header_record

Solution: The function should use xport_write_header_record_v8 in the return statement in stead of plain xport_write_header_record