View source: R/check_tutorial_defaults.R
check_tutorial_defaults | R Documentation |
Checks that tutorials contain required libraries and child documents. The function looks for library() calls and child document inclusions in the tutorial files.
check_tutorial_defaults(
tutorial_paths,
libraries = c("learnr", "tutorial.helpers"),
children = c("info_section", "download_answers")
)
tutorial_paths |
Character vector of the paths to the tutorials to be examined. |
libraries |
Character vector of library names that should be loaded
in the tutorial. The function looks for |
children |
Character vector of child document names (without the .Rmd
extension) that should be included in the tutorial. The function looks
for these in child document inclusion chunks. Default is
|
No return value, called for side effects.
# Check with default requirements
check_tutorial_defaults(
tutorial_paths = return_tutorial_paths("tutorial.helpers")
)
# Check for specific libraries only
check_tutorial_defaults(
tutorial_paths = return_tutorial_paths("tutorial.helpers"),
libraries = c("learnr", "knitr"),
children = c("copy_button")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.