View source: R/openCaseStudy.R
| openCaseStudy | R Documentation |
Opens a case study .Rmd file for interactive use. The file shipped
inside the package is copied to dest_dir (so it is writable), then
opened in the RStudio editor when available (otherwise the system editor).
openCaseStudy(id, dest_dir = getwd(), overwrite = FALSE, ...)
opencs(id, dest_dir = getwd(), overwrite = FALSE, ...)
ocs(id, dest_dir = getwd(), overwrite = FALSE, ...)
id |
Case study identifier. Flexible formats are accepted, including
|
dest_dir |
Directory to copy the case study into. Defaults to the
current working directory. This legacy argument is retained for
compatibility; new code may use the camelCase |
overwrite |
Logical; overwrite an existing file in |
... |
Additional compatibility arguments. Currently supports
|
Invisibly returns the path to the copied file.
if (interactive()) {
openCaseStudy("2.1")
openCaseStudy("2.1", destDir = tempdir())
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.