Learning learnr


July 1, 2020

During my RStudio internship in 2020, I explored a wonderful package in R called {learnr}, used to author interactive lessons. My goal was to try to add Python support, so we can start making Python lessons which led me to PR #390 that adds support for learnr exercises for any language supported by {knitr}. One of the features that I hadn’t planned on adding required implementing “chained setup chunks” so that each setup chunk associated with an exercise could further reference another setup chunk.

In the interest of being terse, I wrote a post on the RStudio Education blog that describes the main stages of writing to rendering and interacting with learnr documents. For the nerds out there, I also illustrated basic architecture and the tech stacks involved with learnr and a “simple” way to think about the package.