Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

lesson_to_html

Turn a swirl lesson into a pretty webpage


Description

Create an easily shareable HTML version of your swirl lesson. This function detects the lesson you are working on automatically via getOption('swirlify_lesson_file_path'), converts it to R Markdown (Rmd), then generates a stylized HTML document and opens it in your default browser. To prevent clutter, the Rmd files are not kept by default, but they can be kept by setting keep_rmd = TRUE.

Usage

lesson_to_html(dest_dir = NULL, open_html = FALSE, keep_rmd = FALSE,
  quiet = FALSE, install_course = TRUE)

Arguments

dest_dir

Destination directory (i.e. where to put the output files). If not set, default is the directory which contains the course directory.

open_html

Should the HTML file produced be opened in your browser? Default is FALSE.

keep_rmd

Should the Rmd file be kept after the HTML is is produced? Default is FALSE.

quiet

Should the Rmd rendering output be silenced? Default is FALSE.

install_course

Should the course be installed? Default is TRUE.

Details

The output is formatted to be a readable, standalone tutorial. This means that information contained in the swirl lesson such as answer tests and hints are excluded from the Rmd/HTML output.


swirlify

A Toolbox for Writing 'swirl' Courses

v0.5.3
MIT + file LICENSE
Authors
Sean Kross [aut, cre], Nick Carchedi [aut], Chih-Cheng Liang [ctb], Wush Wu [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.