One moment, processing...

Printer-friendly version

Blog Viewer

importing SAS dataset to R
Can anyone help me with how to import SAS dataset in to R software.
I am familiar with SPLUS.
I am trying to use R to create Graphics.
Thanks

Ratna
Director of Biostatistics
J&J


Not Yet Rated
Your Rating
0 Ratings
1 Comments
651 Views

Permalink

Copy and paste the link below into other web pages, documents, or email messages to allow immediate, permanent access to this page. Security settings will remain in place and login will be necessary for protected content.

Related Resources

No Related Resource entered.

Comments

 
Rick Wicklin October 11, 2012 12:30 pm
First, you should know that SAS's graphics have greatly improved in recent years.
(1) If you are using the SAS analytical procedures (for example, SAS/STAT) the procedures create many plots automatically: http://support.sas.com/resources/papers/76822_ODSGraph2011.pdf
(2) If you need a do-it-yourself plot, there are the SG procedures: http://www.wuss.org/proceedings08/08WUSS%20Proceedings/papers/how/how05.pdf
(3) If you need more power, the Graph Template Language can create virtually any graph: http://support.sas.com/resources/papers/sgf2008/gtl.pdf
That said, there are two ways to import SAS data sets into R. If you have SAS (in particular, SAS/IML), there is a built-in interface to R that includes functions to transfer SAS data sets to and from R data frames. See http://support.sas.com/documentation/cdl/en/imlug/65547/HTML/default/viewer.htm#imlug_r_toc.htm
Lastly, if you don't have SAS but obtained the SAS data set through a third party, there is an R package (see http://biostatmatt.com/archives/1468) that the author claims can read SAS data sets. I have not used it myself.
Copyright © 2012 American Statistical Association. All Rights Reserved.