# Reverse engineering the SAS data file format

**Robert Grant's stats blog » R**, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I think it’s rather marvellous that a few expert coders are working on dispelling the cloud of mystery around the proprietary file format used by SAS software. Essentially, saving your data in a SAS format (with a name like mydata.sas7bdat) locks you into their software. They have tied this up much tighter than the other software houses: IBM have a clever compressed format for SPSS data but it has largely been decoded and you can open it directly from many other packages, while Stata have a pretty clear file format which has even been adopted by others like MLwiN for saving.

As BioStatMatt has recently reported, there is now a package within R called sas7bdat, which will allow you to import directly. This means that data can be shared, checked and analysed by anyone without having to pay for a copy of SAS or other commercial products like Stat/Transfer and its SASdecoder plug-in.

By the way, if you want to see what we know so far about the sas7bdat format, check out the vignettes PDF at the CRAN site.

**leave a comment**for the author, please follow the link and comment on their blog:

**Robert Grant's stats blog » R**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.