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!
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.
Filtering Observations
An example tutorial teaching a common data
transformation: filtering rows of a data frame with dplyr::filter()
.
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.
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.
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.
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.
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.