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.

rlogo

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.

rlogo 

 

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.

Banner


Konrad Zuse Born On This Day In 1910
22/06/2025

Today marks the 115th anniversary of Konrad Zuse. Although his name may not be familiar in English-speaking circles, in Germany he is known as "der Vater des Computers". He does indeed have a strong c [ ... ]



GNU Nano 8.5 Enhances Anchor Positions
10/07/2025

GNU Nano 8.5 has been released with improved text anchors and fine-tuned syntax coloring. GNU nano is a command line text editor for Unix and Linux that aims to be simple and easy to use.


More News

pico book

 

Comments




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

Last Updated ( Friday, 06 December 2019 )