run_quiz: Setting Up and Running Simple learnr Quizzes with R/exams Exercises
Description
The run_quiz function is a convenience tool that sets up a learnr
tutorial embedding R/exams exercises in a temporary directory and directly
running it in a shiny app.
Usage
run_quiz(file, name = "quiz", title = "R/exams quiz", dir = NULL, ...,
default_file = NULL, auto_reload = TRUE, shiny_args = NULL, render_args = NULL)
Value
Invisible NULL (from link[rmarkdown]{run}).
Arguments
file
character. A specification of a (list of) exercise files.
name
character. A name prefix for the resulting learnr tutorial .Rmd file.
title
character. Title of the learnr tutorial.
dir
character. A path in which the tutorial file is created, by default
chosen as a tempfile.
run_quiz is a convenience function that sets up a learnr .Rmd
tutorial (in a temporary directory by default) with a quiz
and then calls run from rmarkdown to quickly try out the
quiz interactively.
For full customization it is recommended to set up a dedicated .Rmd file
within which exams2learnr can be used to include
R/exams exercises.