Introduction to R

Two short courses for people who are new to R. The first teaches the R language itself; the second shows you how to read, filter and plot data with the tidyverse. Everything runs in your web browser, in a workbench modelled on RStudio, so there is nothing to install. When you finish a course, you can download a certificate.

  1. R basics
  2. calculations
  3. objects
  4. functions
  5. vectors
  6. data frames
  7. Tidyverse
  8. reading files
  9. filtering
  10. pipes
  11. plots
Your certificates will be made out to
Part 1

R basics

Your first steps in R. Use it as a calculator, keep values in objects, call functions and read their help, and get to know vectors, the building blocks of all data in R.

  • Calculations, and objects to keep values in
  • Functions, their arguments, and R’s help
  • Vectors: c(), seq(), rep() and the colon
  • Vectorised operations and recycling
  • Random numbers and a first t-test
  • Lists, data frames and tibbles

About 2½ hours41 steps and 22 questions

Not started yet
Part 2

Tidyverse

Read data from files into tibbles, pick out the rows and columns you need, chain the steps together with pipes, and draw plots with ggplot2. Do R basics first.

  • Installing and loading the tidyverse
  • Reading files with readr, and tidy data
  • Choosing columns and rows: select() and filter()
  • Pipes: one step after another
  • Plots with ggplot2: points, bars, histograms
  • Titles, labels, and a line of best fit

About 3 hours34 steps and 19 questions

Not started yet

Before you start

  • Use a laptop or desktop computer with an up-to-date Chrome, Edge, Firefox or Safari. A wide screen helps, because the instructions sit beside the workbench.
  • Do R basics first: the tidyverse course builds on it.
  • R itself is downloaded into your browser the first time you open a course (about 30 MB), and the tidyverse adds about a minute more the first time you install it.
  • Your ticks, answers, files and name are saved in this browser, on this computer. Use another computer, or a private window, and you start again. Each course has My answers and My files buttons for downloading your work.
  • Each course has an AI assistant you can ask about R, if you have a key for an AI service. Never type personal or patient data into it, or into any other AI tool.

How the courses work

  • Each course is a set of short chapters. Each chapter explains an idea, shows you some R, and then gives you an activity to do in the workbench.
  • The steps of an activity tick themselves when R sees that you have done them, and questions with a Check button are marked straight away.
  • Parts marked If you have time are extras: they don’t count towards your certificate.
  • When every step and question is done, your certificate is unlocked. It shows your name and the date you finished, and you can download it as a PDF.