Tuesday, July 10, 2012

This is *huge*: SAScii package

http://blog.revolutionanalytics.com/2012/07/importing-public-data-with-sas-instructions-into-r.html Q: How do you make a hairless primate? Answer 1: Take a hairy primate, wait a few million years and see if Darwin was right. Answer 2: Make them work in SAS and watch them pull all their hair out. Unfortunately many public datasets are released as ASCII files with only SAS code to read them in, name all the variables properly, etc. Now there's a new kid on the block, the SAScii package for R, which will read in the SAS script, parse it, and deliver you an R file instead. Since R has fabulous import/export abilities (via the foreign package), this means even if you are a Stata user you can take advantage.


  1. For STATA users, no need to go through R:

    import sasxport filename [, import_options]

  2. Hi Sean,

    I think that command only works for reading SAS transport files into Stata, not for reading in an ASCII data file with a SAS input script. :)

    - Anthony

  3. I agree Ari. SAScii is an important addition to R. Way to go Anthony!

  4. what do you mean by:
    "read in the SAS script"

    Do you mean SAS-DATA-SET?