, , ,

A swirl is an interactive way of learning R by installing a package called {swirl} into R and then installing a course.

I have used swirls in the Data Science Courses on Coursera and found them a useful way of learning and testing your knowledge.

swirl is installed as a package into R using the following command in R (internet connection required).

> install.packages("swirl")

Then launching the swirl library and run it.

> library("swirl")
> swirl()

To locate a swirl course use the following command.


Sources: Swirlstats

There are a list of courses available in the swirl repository on GitHub. There are 3 levels of courses available.


  • R Programming: The basics of programming in R
  • R Programming Alt: Same as the original, but modified slightly for in-class use
  • Data Analysis: Basic ideas in statistics and data visualization
  • Mathematical Biostatistics Boot Camp: One- and two-sample t-tests, power, and sample size
  • Open Intro: A very basic introduction to statistics, data analysis, and data visualisation


  • Regression Models: The basics of regression modeling in R
  • Getting and Cleaning Data: dplyr, tidyr, lubridate, oh my!


  • Statistical Inference: This intermediate to advanced level course closely follows the Statistical Inference course of the Johns Hopkins Data Science Specialization on Coursera.

To install a course you can use the following commands in R

install_from_swirl("Course Name Here")

Datacamp have recently released a free browser based R learning tool. This is a browser based  version to learn R based on a flipcard version of swirl teaching you in bite sized chunks.