tidyverse / haven

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

Incorrect v8 xpt files #756

Open DirkDeWachter opened 3 months ago

DirkDeWachter commented 3 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