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


pg_parquet - Postgres To Parquet Interoperability
28/11/2024

pg_parquet is a new extension by Crunchy Data that allows a PostgreSQL instance to work with Parquet files. With pg_duckdb, pg_analytics and pg_mooncake all of which can access Parquet files, is  [ ... ]



PHP 8.4 Adds Property Hooks
26/11/2024

PHP 8.4 is available with improvements including property hooks, asymmetric visibility, and an updated DOM API.


More News

espbook

 

Comments




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

Last Updated ( Friday, 06 December 2019 )