R Programming

Learn R for data analysis: vectors, data frames, the tidyverse, dplyr and ggplot2, statistics and regression, Quarto reports, Shiny and reproducible workflows.

Start course →

What you'll learn

  • Explain what R is for, set up R with an IDE and manage packages and projects reproducibly.
  • Work with vectors, lists, factors, matrices, data frames and tibbles.
  • Write R functions, use pipes and apply functions over data with base R and purrr.
  • Import, clean, transform, reshape and join data with the tidyverse.
  • Visualise and explore data with ggplot2, and apply descriptive statistics, hypothesis tests and regression.
  • Produce reproducible reports and Shiny apps, and organise work with Git, renv, tests and packages.

Syllabus

Getting Started with R

  1. What R Is For
  2. Installing R, IDEs, Packages and Projects
  3. Assignment, Types and Basic Operations

Data Structures

  1. Vectors, Recycling and Indexing
  2. Lists, Factors and Matrices
  3. Data Frames and Tibbles

Programming in R

  1. Control Flow and Vectorisation
  2. Functions, Defaults, Dots and Pipes
  3. The apply Family and purrr

Data Wrangling with the Tidyverse

  1. Importing and Cleaning Data
  2. Transforming Data with dplyr
  3. Tidy Data, Reshaping and Joins

Visualisation and Exploration

  1. The Grammar of Graphics with ggplot2
  2. Facets, Scales, Labels and Themes
  3. Exploratory Data Analysis

Statistics and Modelling

  1. Descriptive Statistics and Distributions
  2. Hypothesis Tests and Confidence Intervals
  3. Linear and Logistic Regression

Strings, Dates, Objects and Performance

  1. Strings with stringr and Dates with lubridate
  2. Functions as Objects, Environments and S3/R6 Classes
  3. Performance and Big Data in R

Reports, Apps, Workflow and Revision

  1. Reproducible Reports with Quarto and R Markdown
  2. Interactive Apps with Shiny
  3. Workflow: Projects, Version Control, Testing and Packages
  4. Revision and Interview Questions