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.
Subscribe to:
Post Comments (Atom)
For STATA users, no need to go through R:
ReplyDeleteimport sasxport filename [, import_options]
Hi Sean,
ReplyDeleteI 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
I agree Ari. SAScii is an important addition to R. Way to go Anthony!
ReplyDeletewhat do you mean by:
ReplyDelete"read in the SAS script"
Do you mean SAS-DATA-SET?