Chapter 14 Interactive Tutorials

The learnr package (Aden-Buie, Schloerke, et al. 2023) makes it easy to turn any R Markdown document into an interactive tutorial. Tutorials consist of content along with interactive components for checking and reinforcing understanding. Tutorials can include any or all of the following:

  1. Narrative, figures, illustrations, and equations.

  2. Code exercises (R code chunks that users can edit and execute directly).

  3. Quiz questions.

  4. Videos (currently supported services include YouTube and Vimeo).

  5. Interactive Shiny components.

Tutorials automatically preserve work done within them, so if a user works on a few exercises or questions and returns to the tutorial later, they can pick up right where they left off.

This chapter is only a brief summary of learnr’s full documentation at https://rstudio.github.io/learnr/. If you are interested in building more sophisticated tutorials, we recommend that you read the full documentation.

References

Aden-Buie, Garrick, Barret Schloerke, JJ Allaire, and Alexander Rossell Hayes. 2023. Learnr: Interactive Tutorials for r. https://rstudio.github.io/learnr/.