Confirm that a tutorial has the recommended components
Source:R/check_tutorial_defaults.R
check_tutorial_defaults.Rd
Checks that tutorials contain required libraries and child documents. The function looks for library() calls and child document inclusions in the tutorial files.
Arguments
- 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
library(name)
calls. Default isc("learnr", "tutorial.helpers")
.- 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
c("info_section", "download_answers")
.
Examples
# 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")
)