run_quiz {exams2learnr} | R Documentation |
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)
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 |
... |
arguments passed to |
default_file , auto_reload , shiny_args , render_args |
arguments passed
to |
Details
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.
Value
Invisible NULL
(from link[rmarkdown]{run}
).
See Also
Examples
## Not run:
## quickly run a quiz based on a set of R/exams exercises
run_quiz(c("capitals.Rmd", "fruit.Rmd", "function.Rmd"))
## End(Not run)