run_tutorial: Run a tutorial

Description Usage Arguments Details See Also Examples

View source: R/run.R

Description

Run a tutorial which is contained within an R package.

Usage

1
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

1
2
3
4
5
# display all "learnr" tutorials
available_tutorials("learnr")

# run basic example within learnr
## Not run: run_tutorial("hello", "learnr")

Example output

Available tutorials:
* learnr
  - ex-data-basics    : "Data basics"
  - ex-data-filter    : "Filter observations"
  - ex-data-mutate    : "Create new variables"
  - ex-data-summarise : "Summarise Tables"
  - ex-setup-r        : "Set Up"
  - hello             : "Hello, Tutorial!"
  - quiz_question     : "Tutorial Quiz Questions in `learnr`"
  - slidy             : "Slidly demo" 
Warning message:
requested TAR '/bin/tar' does not exist; using 'internal' instead 

learnr documentation built on March 26, 2020, 7:45 p.m.