Interface for 'exams' Exercises in 'learnr' Tutorials

Automatic generation of quizzes or individual questions for 'learnr' tutorials based on 'R/exams' exercises.



R/exams + learnr logos

Interface for R/exams Exercises in learnr Tutorials

Overview

The R package exams2learnr provides an R/exams (https://www.R-exams.org/) interface for learnr tutorials.

Currently, there is support for the following question types:

Description R/exams learnr
Single-choice schoice learnr_radio
Multiple-choice mchoice learnr_checkbox
Numeric num learnr_numeric
Text string learnr_text

Thus, there is no support, yet, for cloze questions.

The main function is exams2learnr() which is typically used within learnr Rmd tutorials. For a single exercise the function returns a learnr tutorial_question and for several exercises it yields a learnr tutorial_quiz. Both usages are illustrated by two example files provided within the package.

  • learnr_questions.Rmd: All questions set up indvidually.
  • learnr_quiz.Rmd: An entire quiz set up in one go.

Additionally, the function run_quiz() can be used to quickly set up and run a quiz interactively based on a set of R/exams exercises. For example:
run_quiz(c("capitals.Rmd", "fruit.Rmd", "function.Rmd"))

Tutorial

An introductory tutorial is hosted on the R/exams website at https://www.R-exams.org/tutorials/exams2learnr/.

Installation

The stable version of exams2learnr is available from CRAN:

install.packages("exams2learnr")

The latest development version can be installed from R-universe:

install.packages("exams2learnr", repos = "https://zeileis.R-universe.dev")

License

The package is available under the General Public License version 3 or version 2

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("exams2learnr")

0.1-1 by Achim Zeileis, 2 months ago


https://www.R-exams.org/tutorials/exams2learnr/


Report a bug at https://codeberg.org/zeileis/exams2learnr/issues


Browse source code at https://github.com/cran/exams2learnr


Authors: Achim Zeileis [aut, cre] (ORCID:


Documentation:   PDF Manual  


GPL-2 | GPL-3 license


Imports knitr, learnr, rmarkdown

Depends on exams


See at CRAN