Reverse engineering the SAS data file format

November 6, 2012

(This article was first published on Robert Grant's stats blog » R, and kindly contributed to R-bloggers)

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.

To leave a comment for the author, please follow the link and comment on their blog: Robert Grant's stats blog » R. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)