| casestudy | R Documentation |
Renders a specified case study R Markdown file shipped with the package to HTML and optionally opens it in a web browser.
casestudy(
id,
output_dir = tempfile("s20x_case_study_"),
open = interactive(),
quiet = TRUE,
...
)
cs(...)
id |
A case study identifier. Flexible formats are accepted, including
|
output_dir |
Directory where the rendered HTML file should be written. Defaults to a temporary directory. |
open |
Logical; if |
quiet |
Logical; passed to |
... |
Additional arguments passed to |
Case studies are expected to live in inst/case_studies and to be named
using the pattern CS<chapter>_<number>.Rmd (for example,
CS9_2.Rmd).
The case study is rendered on demand using rmarkdown::render().
Figures and other outputs are generated at render time; users therefore need
any required packages installed for the selected case study.
The rendered HTML file is returned invisibly.
Invisibly returns the path to the rendered HTML file.
## Not run:
casestudy("CS9_2")
casestudy("9.2")
cs("9_2")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.