I am trying to import an xpt file into R using read.xport from both SASxport and foreign package but somehow I keep getting below error message:
Error in lookup.xport.inner(file) :
SAS transfer file has incorrect library header
The same error would also appear using sasxport.get() from Hmisc package. However, the file itself looks fine under SAS viewer on my PC. Has anyone encountered this problem before, or can you suggest of a solution? Thank you.
When openning the file using a text editor the header looks like this:
HEADER RECORD*******LIBRARY HEADER RECORD!!!!!!!000000000000000000000000000000 SAS SAS SASLIB 6.06 bsd4.2