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.
Community Showcase
learnr’s community has built some excellent tutorials and resources for learning data science and programming. Here are just a few highlights. (Please suggest your favorite learnr resources.)
DoSStoolkit
The Department of Statistical Sciences (DoSS) toolkit is a free series of open source online modules written by undergraduates, that their fellow students and the public can use to learn the essentials of R.
learntidymodels
Learn tidymodels in the browser or locally in your RStudio IDE!
qsslearnr
This package contains learnr tutorials based on Quantitative Social Science: An Introduction by Kosuke Imai from Princeton University Press.
Between the Pipes
betweenthepipes
is an R package with two tutorials, useful for learning tidyverse basics with hockey data.
afrilearnr
A growing collection of interactive learnr tutorials for learning spatial data analytics while making African maps.
RTLedu
RTLedu contains learnr tutorials to accompany the RTL R package by @risktoollib.