Skip to content

Complete Tutorials

These tutorials were designed to showcase the features of the learnr package — and to teach learners how to use R! Try working through these tutorials to get a sense of the look and feel of a learnr tutorial. Then check out the source code to see how these tutorials were made!

Preview image of Setting Up R
Setting Up R

A tutorial featuring videos and interactive questions to guide a new R user through the installation and set up of everything they'll need to get started with R.

Preview image of Filtering Observations
Filtering Observations

An example tutorial teaching a common data transformation: filtering rows of a data frame with dplyr::filter().

Preview image of Summarizing Data
Summarizing Data

An example tutorial where learners are introduced to dplyr::summarise(). Along the way, learners also gain practice with the pipe operator, %>%, and dplyr::group_by().

Demo Tutorials

There’s a lot that learnr can do. These tutorials showcase specific learnr features or show you some possibilities that build on other packages designed to work with R Markdown and learnr.

Preview image of learnr: Quiz Questions
learnr: Quiz Questions

A brief introduction to the types of interactive questions you can use in a learnr tutorial with the learnr::question() and learnr::quiz() functions.

Preview image of learnr: slidy layout
learnr: slidy layout

learnr tutorials can even be used in slides! This example tutorial is a short presentation that showcases an interactive exercise that produces interactive visualizations with htmlwidgets.

Preview image of learnr: SQL Exercises
learnr: SQL Exercises

You can use learnr to teach students how to work with databases using interactive SQL exercises. In this example, we describe how to create your own SQL exercises using the gradethis package to check the student's query.

Preview image of sortable: Ranking Questions
sortable: Ranking Questions

The sortable package allows you to create custom HTML widgets with drag-and-drop capabilities that you can even use in learnr tutorials. This tutorial shows you what's possible with sortable and how to add drag-and-drop questions to your tutorials.