LearnR Updates Quiz Questions
Friday, 06 December 2019

There's a new release of learnr, the R learning package from RStudio. In this new version, quiz questions have been expanded to allow for more question types.

The learnr package can be used to turn an R Markdown document into an interactive tutorial. Tutorials consist of content along with interactive components for checking that you understand. Tutorials can contain explanations, figures, illustrations, and equations, as well as code exercises (R code chunks that users can edit and execute directly), quiz questions, videos and 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.


Quiz questions in learnr are now mini shiny applications, which the developers say opens the door to new and extendable question types, such as text box and ranking questions. For the moment there are three basic types of quiz questions: radio button, checkbox, and text box. Each one allows for one choice, multiple choices, and direct user input respectively.

Another improvement in this release is the the ability to rank questions using the sortable package as part of the learnr quiz question API. Sortable is an htmlwidgets wrapper round the drag-and-drop sortable.js.  

Another change in learnr is that tutorials are now aggressively pre-rendered using the latest r markdown. The developers say package developers should not include the pre-rendered HTML files in their packages as users will most likely need to recompile the tutorial.

The final change of note affects tutorials with broken code within exercises for users to fix, In the new release, the CRAN version of packrat will not find all of your dependencies to install when the tutorial is deployed. To deploy tutorials containing exercise code with syntax errors, you now need to install the development version of packrat, which will find dependencies per R chunk.



More Information

Learnr On GitHub

Related Articles

RStudio Reticulated Python

RStudio Adds Object Explorer

RStudio Improves Connections

RStudio Adds SparklyR Support


To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, Facebook or Linkedin.


V8 JavaScript Engine Reduces Heap Size

The latest release of V8, Google's open source JavaScript engine, will reduce heap size by 40 percent by using pointer compression when it is released alongside Chrome 80 stable in a few weeks.

Google Launches Android Games Competition

Google has the announced the 2020 edition of the annual Google Play Indie Games Festival. This year Google will host three competitions for developers from several European countries, Japan, and South [ ... ]

More News





or email your comment to: comments@i-programmer.info

Last Updated ( Friday, 06 December 2019 )