Creates a new tutorial below inst/tutorials/. Tutorials are interactive R
Markdown documents built with the learnr package. use_tutorial() does
this setup:
Adds learnr to Suggests in
DESCRIPTION.Gitignores
inst/tutorials/*.htmlso you don't accidentally track rendered tutorials.Creates a new
.Rmdtutorial from a template and, optionally, opens it for editing.Adds new
.Rmdto.Rbuildignore.
Usage
use_tutorial(name, title, open = rlang::is_interactive())Arguments
- name
Base for file name to use for new
.Rmdtutorial. Should consist only of numbers, letters,_and-. We recommend using lower case.- title
The human-facing title of the tutorial.
- open
Open the newly created file for editing? Happens in RStudio, if applicable, or via
utils::file.edit()otherwise.
