18
$\begingroup$

I use R. Every day. I think in terms of data.frames, the apply() family of functions, object-oriented programming, vectorization, and ggplot2 geoms/aesthetics. I just started working for an organization that primarily uses SAS. I know there's a book about learning R for SAS users, but what are some good resources for R users who've never used SAS?

$\endgroup$
8
  • $\begingroup$ care to say why is that book not good enough? $\endgroup$ Mar 8, 2011 at 23:28
  • 4
    $\begingroup$ @Eduardo It's in the wrong direction :-). $\endgroup$
    – whuber
    Mar 8, 2011 at 23:43
  • 1
    $\begingroup$ @Steven Maybe you should start with the IML procedure which is the closest conceptually to R. At least that will get the juices going. psych.yorku.ca/lab/sas/iml.htm But, I admit there is probably a need for that reverse tome. $\endgroup$ Mar 9, 2011 at 0:19
  • 2
    $\begingroup$ On a side note, I code a little in R and mostly in Python and just joined a company that heavily uses SAS. I am making some great inroads after 5 months of getting Python included in our toolbox, displacing SAS in some areas. As you navigate the waters, we should consider starting a Wiki about "How to get your company to adopt something other than SAS/SPSS for analytics". I am finding the cultural issues are far more difficult than simply evangelizing the language or performance differences. $\endgroup$ Mar 10, 2011 at 20:29
  • 1
    $\begingroup$ If you decide to follow up on @RalphWinter's suggestion, you might like the SAS/IML blog: blogs.sas.com/content/iml From SAS/IML you can also call R functions, which might help you in the transition: blogs.sas.com/iml/index.php?/archives/… $\endgroup$
    – Rick
    Sep 2, 2011 at 19:26

3 Answers 3

20
$\begingroup$

15 months ago, I started my current job as someone who had been using R exclusively for about 3 years; I had used SAS in my first-ever stats class, loathed it, and never touched it again until I started here. Here's what has been helpful for me, and what hasn't:

Helpful:


  • Colleagues' code. This is the single most useful source, for me. Some of it was very good code, some of it was very bad code, but all of it showed me how to think in SAS.
  • SUGI. Though they are often almost unbearably corny, there is a vast wealth of these little how-to papers all over the Internet. You don't need to look for them; just Google, and they'll present themselves to you.
  • The O'Reilly SQL Pocket Guide, by Gennick. I dodge a lot of SAS coding by using PROC SQL for data manipulation and summarization. This is cheating, and I don't care.
  • This paper explaining formats and informats (PDF). This is without a doubt the least-intuitive part of SAS for me.
  • UCLA's Academic Technology Services' Statistical Computing site. UCLA has heaps of great introductory material here, and there's a lot of parallel material between its R and SAS sections (like these analysis examples).

Not helpful:


  • Anything I've ever read that is intended for people transitioning between R and SAS. I have the "R and SAS" book from Kleinman and Horton, which I've opened twice only to not find the answers I needed. I've read a few other guides here and there. Maybe it's just my learning style, but none of this stuff has ever stuck with me, and I inevitably end up googling for it once I actually need it.

You'll be okay, though. Just read your colleagues' code, ask questions here and on StackOverflow, and - whatever you do - don't try to plot anything.

$\endgroup$
7
  • $\begingroup$ @Matt - I think Proc SGPLOT roxxx. $\endgroup$
    – suncoolsu
    Mar 9, 2011 at 2:33
  • $\begingroup$ @Matt Parker - I have not found a SAS general resource book I have found satisfactory. Do you have any suggestions or do you simply rely on internet searches? $\endgroup$
    – Andy W
    Mar 9, 2011 at 4:39
  • 1
    $\begingroup$ @Matt I found The Kleinman and Horton book pretty useful. And, like @suncoolsu I find the new SGPLOT, SGSCATTER and SGPANEL PROCS are much better than the old SAS graphics system. And SGRENDER allows a LOT of control over graphics. And the ODS graphics that come with each statistical PROC are very nice defaults. $\endgroup$
    – Peter Flom
    Mar 9, 2011 at 10:22
  • 2
    $\begingroup$ @Matt (+1) Nice response. I also came across this blog which provides illustrated examples of R/SAS: sas-and-r.blogspot.com. $\endgroup$
    – chl
    Mar 9, 2011 at 10:37
  • $\begingroup$ Thanks for the pointers on those new procedures, @suncoolsu and @Peter - I've only recently been upgraded to 9.2, so I'll definitely check that out. Also, just to clarify: I don't think "SAS and R" is poorly done, it has just never really helped me when I was in need. @chl, the blog you found is actually the companion blog to this book, which is a really nice addition by the authors. $\endgroup$ Mar 9, 2011 at 16:10
7
$\begingroup$

A couple things to add to what @matt said:

In addition to SUGI (which is now renamed SAS Global Forum, and will be held this year in Las Vegas) there are numerous local and regional SAS user groups. These are smaller, more intimate, and (usually) a lot cheaper. Some local groups are even free. See here

SAS-L. This is a mailing list for SAS questions. It is quite friendly, and some of the participants are among the best SAS programmers there are.

The book SAS and R: Data Management, Statistical Analysis and Graphics by Kleinman and Horton. Look up what you want to do in the R index, and you'll find how to do it in SAS as well. Sort of like a inter-language dictionary.

$\endgroup$
1
  • 1
    $\begingroup$ I'll second the recommendation for the Kleinman book. $\endgroup$ Mar 10, 2011 at 20:24
5
$\begingroup$

In addition to Matt Parkers excellent advice (particularly about reading colleagues code), the actual SAS documentation can be surprisingly helpful (once you've figured out the name of what you want): http://support.sas.com/documentation/

And the Global Forum/SUGI proceedings are available here: http://support.sas.com/events/sasglobalforum/previous/online.html

$\endgroup$
1
  • $\begingroup$ I'll second the vote for the SAS documentation, it really is pretty good (and voluminous). $\endgroup$
    – Hong Ooi
    Mar 10, 2011 at 0:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.