learnr (version 0.10.1)

run_tutorial: Run a tutorial

Description

Run a tutorial which is contained within an R package.

Usage

run_tutorial(name = NULL, package = NULL, shiny_args = NULL)

Arguments

name

Tutorial name (subdirectory within tutorials/ directory of installed package).

package

Name of package

shiny_args

Additional arguments to forward to shiny::runApp.

Details

Note that when running a tutorial Rmd file with run_tutorial the tutorial Rmd should have already been rendered as part of the development of the package (i.e. the corresponding tutorial .html file for the .Rmd file must exist).

See Also

safe and available_tutorials

Examples

Run this code
# NOT RUN {
# display all "learnr" tutorials
available_tutorials("learnr")

# run basic example within learnr
# }
# NOT RUN {
run_tutorial("hello", "learnr")
# }

Run the code above in your browser using DataCamp Workspace