• Introduction
    • What is R?
    • Key Terms
    • Common Symbols
  • 1 R Basics
    • 1.1 Installing and Customizing R
    • 1.2 Installing RStudio
    • 1.3 RStudio Features
    • 1.4 Setting up RStudio
    • 1.5 R Files
      • 1.5.1 .R - R Scripts
      • 1.5.2 .rproj - R Projects
      • 1.5.3 .RData - R Data Files
      • 1.5.4 .RMD - R Markdown
    • 1.6 R Data Structures
      • 1.6.1 Vector
      • 1.6.2 Data frame
      • 1.6.3 Tibble
      • 1.6.4 List
    • 1.7 Installing Packages
      • 1.7.1 CRAN
      • 1.7.2 Github
    • 1.8 Loading Packages
    • 1.9 Importing Data
      • 1.9.1 Importing a .CSV File
      • 1.9.2 Importing an Excel file
      • 1.9.3 Importing an SPSS data file
      • 1.9.4 Importing Files from the Internet
    • 1.10 RStudio Tips to Help Write Efficient Code
      • 1.10.1 Commenting
      • 1.10.2 Sectioning Scripts
      • 1.10.3 Data Object Names
      • 1.10.4 Shortcuts
  • 2 Data Preparation and Cleaning in R
    • 2.1 Introduction to the Tidyverse
      • 2.1.1 Extracting a variable
      • 2.1.2 Make new variables (columns)
    • 2.2 Viewing Your Data
      • 2.2.1 The RStudio Environment
      • 2.2.2 Structure of Data - str()
      • 2.2.3 Variable/Column Names - names()
      • 2.2.4 First n Rows - head()
    • 2.3 Renaming Variables
    • 2.4 Renaming Multiple Variables
    • 2.5 Cleaning Names with janitor
      • 2.5.1 Summary Stats - describe()
      • 2.5.2 Summary Stats - describeBy()
      • 2.5.3 Summary Stats - summary()
      • 2.5.4 Summary Stats - skim()
      • 2.5.5 Crosstabs - table()
    • 2.6 Keeping and Dropping Variables
    • 2.7 Keeping and Dropping Rows
    • 2.8 More Frequencies and Descriptives
    • 2.9 Spotting Coding Mistakes
    • 2.10 Modifying Data - mutate()
    • 2.11 Reordering Categories - factor()
    • 2.12 Clearing Whitespace in Text - str_trim()
    • 2.13 Combining Categories - case_when()
    • 2.14 Splitting variables with split()
    • 2.15 Descriptives
      • 2.15.1 Mean - mean()
      • 2.15.2 Median - median()
      • 2.15.3 Using the summarize() function - summarize()
      • 2.15.4 Analyzing Data by Groups - group_by()
    • 2.16 Spotting Outliers
      • 2.16.1 Detecting Numerical Outliers
      • 2.16.2 Detecting outliers with Z-scores
      • 2.16.3 Dealing with Outliers
    • 2.17 Assessing Normality
      • 2.17.1 Histograms
      • 2.17.2 Density (Curve) Plots
      • 2.17.3 QQ Plots
      • 2.17.4 Skewness and Kurtosis
      • 2.17.5 Tests of Normality
      • 2.17.6 Transforming Variables
    • 2.18 Identifying missing data
      • 2.18.1 Per Variable
      • 2.18.2 Entire Data Frame
    • 2.19 Dropping missing data
    • 2.20 Replacing missing data with 0s
    • 2.21 Mean imputation
    • 2.22 Multiple imputation
  • 3 More Data Manipulation in R
    • 3.1 Wide and Long Data
    • 3.2 Pivoting data from wide to long - pivot_longer()
      • 3.2.1 Pivoting survey data
    • 3.3 Pivoting data from long to wide - pivot_wider()
    • 3.4 Joining multiple data objects
      • 3.4.1 Left Join
      • 3.4.2 Left Joining our Survey Data
  • 4 Statistics in R
    • 4.1 T-Tests
      • 4.1.1 Independent Means T-Test
    • 4.2 Chi Square
      • 4.2.1 Chi Square Goodness of Fit
      • 4.2.2 Chi Square Test of Independence
    • 4.3 Analysis of Variance (ANOVA)
      • 4.3.1 One-Way Between Subjects ANOVA
      • 4.3.2 One-Way Within Subjects ANOVA
    • 4.4 Factorial Between Subjects ANOVA
  • 5 Data Visualization in Base R
    • 5.1 Scatter Plot
    • 5.2 Bar Graph
    • 5.3 Histogram
    • 5.4 Box Plot
  • 6 Data Visualization with ggplot
    • 6.1 ggplot
    • 6.2 Grammar of Graphics
    • 6.3 Data
    • 6.4 Aesthetics
    • 6.5 Geometries
      • 6.5.1 Bar Charts
      • 6.5.2 Histograms
      • 6.5.3 Boxplots
      • 6.5.4 Scatterplots
      • 6.5.5 Barbell Charts
      • 6.5.6 Line Charts
      • 6.5.7 Colors
      • 6.5.8 Labels
      • 6.5.9 Multiple Plots
      • 6.5.10 Themes
  • 7 Resources
    • 7.1 Programming in R
    • 7.2 Statistics
    • 7.3 Data Visualization
    • 7.4 Troubleshooting
    • 7.5 Getting Help

R Software Handbook

7 Resources

7.1 Programming in R

  • Allison Hort’s Stats Illustrations
  • Data Carpentry
  • How to Clean Messy Data in R

7.2 Statistics

  • Data Science in Education using R
  • Learning Statistics on YouTube

7.3 Data Visualization

  • R Graph Gallery.

7.4 Troubleshooting

  • Working with rtools

7.5 Getting Help

  • Stack Overflow