
Loved by learners at thousands of companies
Course Description
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.
Training 2 or more people?
Get your team access to the full DataCamp platform, including all the features.- 1
Introduction
FreeThis section introduces R and describes how it integrates the five main parts of SAS, SPSS and Stata into a powerful, comprehensive system.
- 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.
- 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.
- 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.
- 5
Programming Language Basics
This section covers the basics of R expressions, assignments and commands.
- 6
Data Structures
A whole chapter on data sets? You’re used to software that revolves around “the dataset” but in the world of R, there’s much more flexibility. And yes, flexibility does come at a price: added complexity.
Introduction to Data Structures50 xpData Structures50 xpCreate a Vector100 xpVector Operations - Workshop100 xpVector Operations on a Company Review100 xpRecycling50 xpVector Attributes50 xpCharacter vectors100 xpMissing Values50 xpObtaining information out of vectors50 xpUnderstanding your vectors100 xpSelecting Vector Elements100 xpSelecting Vector Elements Using Gender.100 xpFactors and Labels50 xpCreating a Factor100 xpValue Labels100 xpFactors, Labels and Selecting by Label with a Character Vector100 xpData Frames50 xpData Frame Statements50 xpCreate a Data Frame100 xpTable Data Frames50 xpMatrices and Lists50 xpMatrices100 xpLists100 xpExploring Lists50 xp - 7
Managing Files & Workspace
R is a whole work “environment”. This chapter covers R commands that are commonly found in operating systems.
- 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.
- 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.
- 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.
- 11
Selecting Variables
In other packages, there are just a few ways of selecting variables. This section covers six different ways to select variables in R, including the one that is most like your current software, the dplyr package’s “select” function.
Selecting Variables (1)50 xpSelect Variables using $ Notation100 xpSelect Variables using attach100 xpAttaching and detaching data50 xpCreating new variables with data attached50 xpSelect Variables using with100 xpSelecting Variables (2)50 xpSelect Variables by subscripting or indexing100 xpComma details50 xpSelect Variables using Formulas100 xpThe dplyr package50 xpdplyr's select Function100 xpNesting select100 xp - 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.
- 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.
- 14
Transformations
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.
- 15
Graphics
R offers multiple packages to do graphics. The built-in one is good for many things, but it’s not ideal for displaying the same plot for multiple groups in your data. So this section also includes the popular ggplot2 package. It uses the same approach as SPSS’ Graphics Production Language, but is easier to learn because it uses standard R code to do any data transformations your plot requires.
Traditional or Base Graphics50 xpBasic Plotting with Factors100 xpBasic Plotting with Continuous Variables100 xpBasic Plotting with Histograms100 xpEmbellishments (1)50 xpGraphical Parameters50 xpAdding Embellishments100 xpWhat can plot do?50 xpPlotting Groups (1)50 xpWhat is wrong with this plot?50 xpScatter Plot with Regression50 xpScatter plot with Regression: the manual approach100 xpScatter plot with Regression: the automated approach100 xpCombine them all!100 xpThe ggplot2 package50 xpThe ggplot2 package statements50 xpThe Grammar of Graphics50 xpBasic Plotting with ggplot2100 xpBasic Plotting with ggplot2 ctd.100 xpPlotting groups with ggplot2100 xpThe ggplot2 package (2)50 xpAdvanced Plotting with ggplot2100 xpRegression analysis with ggplot2100 xpEmbellishments (2)50 xpAdding Embellishments with ggplot2100 xpCreate a Theme100 xpUse a Palette100 xpCombine them all! Again!100 xpInteractive Graphics & Graphics Resources50 xp - 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.
- 17
Basic Statistics
The basic statistical routines that are built into R are surprisingly sparse. This section points out add-on packages that provide output more like your current software.
The R's built-in Means functions50 xpComputing the means100 xpOther statistics100 xpGetting summary statistics50 xpComputing summary statistics in R100 xpAlternative function to compute summary statistics100 xpR's description abilities50 xpDescribe your data!100 xpR's tabulation possibilities50 xpSet up a crosstable! (1)100 xpSet up a crosstable! (2)100 xp - 18
Correlation & Regression
R’s built-in functions are great if you just need correlations. But if you need output that includes n’s and p-values, you need to turn to add-on packages. Regression in R is done in a multi-step approach that will make Stata users feel right at home, but which will seem alien to SAS and SPSS users at first.
Correlations and its significance50 xpCorrelations and pairwise p-values by a number of steps? (1)100 xpAre the correlations significant?50 xpCorrelations and pairwise p-values by a number of steps? (2)100 xpCorrelations and pairwise p-values by only one operation50 xpModeling functions: a different approach50 xpLinear regression (1)100 xpLinear regression (2)50 xpGet the output50 xpWhat can you extract from an object?50 xpCommon regression models50 xpMultiple regression with interaction100 xpThe role of the interaction term50 xpPolynomial regression100 xpThe usefulness of higher order terms50 xp - 19
Comparing groups
We’ll cover the basic ways to compare groups and why R does not perform the same tests without an add-on package.
Test independency between groups50 xpTest independency between groups: parametric100 xpTest matched groups50 xpTest matched groups: parametric100 xpTest matched groups: non-parametric100 xpAnalysis of variance (ANOVA)50 xpANOVA: Get the means for different subgroups100 xpANOVA: Get the variances for different subgroups100 xpInterpret the Levene's test50 xpANOVA modelling: the parametric approach100 xpANOVA modelling: the non-parametric equivalent100 xpPost-Hoc with t-tests50 xpMultiple hypothesis testing: parametric100 xpMultiple hypothesis testing: non-parametric100 xpWhich groups differ significantly?50 xpANOVA and ANCOVA50 xpR's default?50 xpR's default? (2)50 xp - 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.
- 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.
Training 2 or more people?
Get your team access to the full DataCamp platform, including all the features.Join over 19 million learners and start R for SAS, SPSS and STATA Users today!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.