R for SAS, SPSS and STATA Users

Learn to translate your knowledge of SAS, SPSS, or Stata into R using the same statistics techniques you're familiar with.

Start Course for Free
16 Hours52 Videos196 Exercises29,519 Learners
14450 XP

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA. You confirm you are at least 16 years old (13 if you are an authorized Classrooms user).

Loved by learners at thousands of companies

Course Description

<p>If you already know SAS, SPSS or Stata, you don’t need to spend time learning how to analyze data; you need a course that focuses on translating your knowledge into R. This comprehensive course introduces R jargon using the language you're familiar with.</p>

  1. 1



    This section introduces R and describes how it integrates the five main parts of SAS, SPSS and Stata into a powerful, comprehensive system.

    Play Chapter Now
    50 xp
    R Properties
    50 xp
    How it works
    100 xp
  2. 2

    Installing & Maintaining R

    The software you’re familiar with is a complete software package. However, R is downloaded and installed in pieces. This chapter tells you how to find parts of R that match your current software and how to install them.

    Play Chapter Now
  3. 3

    Help & Documentation

    SAS Institute, IBM (makers of SPSS) and Statacorp all act as one-stop-shops for documentation and support. With R, top-notch documentation and support are also available... if you know where to look! This chapter gives you the best options.

    Play Chapter Now
  4. 4

    RStudio Basics

    There are many ways to control R, but RStudio is the most popular by far. This brief chapter covers what you need to know to get started.

    Play Chapter Now
  5. 7

    Managing Files & Workspace

    R is a whole work “environment”. This chapter covers R commands that are commonly found in operating systems.

    Play Chapter Now
  6. 8

    Controlling Functions

    You can control the way analyses are run in ways that are very similar to your current software, or you can use an object oriented approach that’s unique to R. This section covers the alternatives.

    Play Chapter Now
  7. 9

    Data Acquisition

    You can’t analyze data until you read it in, so this chapter covers various types of text files as well as how to import datasets from SAS, SPSS and Stata.

    Play Chapter Now
  8. 10

    Missing Values

    Here’s a topic that almost all statistics packages treat in a similar fashion... but not R! This section guides you through the differences.

    Play Chapter Now
  9. 12

    Selecting Observations

    This section covers the two most common ways to select observations in R, and it points out that the way you specify the logic in those selections follows slightly different rules.

    Play Chapter Now
  10. 13

    Selecting Variables & Observations

    The previous chapters discussed the selection of variables and observations. Here, we'll cover techniques on how to do both at the same time.

    Play Chapter Now
  11. 14


    R is unique in its ability to create new variables from variables stored in multiple datasets at once. This section covers three different ways to specify transformations, pointing out the advantages of each.

    Play Chapter Now
  12. 16

    Writing Functions

    Writing functions in R is very similar to writing macros in SAS, SPSS and Stata. However the resulting functions are much more integrated into the package, more like the “procs” or “commands” of other software. The downside to this though, is that functions are required to do “by group” processing. This section will guide you through the basic steps of both.

    Play Chapter Now
  13. 20

    High Quality Output

    R’s output by default looks pretty bad! But don’t worry, there are add-on packages that produce beautiful publication-quality tables. This section shows how they work.

    Play Chapter Now
  14. 21

    Ways to Run R

    R can be run in many ways, from simple point-and-click user interfaces to deep integration with other stat packages. This section briefly covers the integration of R into Alteryx, Excel, KNIME, R Commander, RapidMiner, Rattle, SAS, SPSS, and Stata.

    Play Chapter Now
Bob Muenchen Headshot

Bob Muenchen

Author of R for SAS & SPSS Users & R for Stata Users

Robert A. Muenchen is the author of R for SAS and SPSS Users and, with Joseph M. Hilbe, R for Stata Users. He is a consulting statistician with over 30 years of experience and is currently the manager of the Research Computing Support (formerly the Statistical Consulting Center) at the University of Tennessee. He holds a B.A. in Psychology and an M.S. in Statistics. Bob has conducted research for a variety of public and private organizations and has assisted on more than 1,000 graduate theses and dissertations. He has written or coauthored over 70 articles published in scientific journals and conference proceedings. Bob has served on the advisory boards of the SAS Institute, SPSS Inc., the Statistical Graphics Corporation and PC Week Magazine. His suggested improvements have been incorporated into SAS, SPSS, JMP, STATGRAPHICS and several R packages.
See More

What do other learners have to say?

I've used other sites—Coursera, Udacity, things like that—but DataCamp's been the one that I've stuck with.

Devon Edwards Joseph
Lloyds Banking Group

DataCamp is the top resource I recommend for learning data science.

Louis Maiden
Harvard Business School

DataCamp is by far my favorite website to learn from.

Ronald Bowers
Decision Science Analytics, USAA