Learn R Programming

s20x (version 3.2.1)

openCaseStudy: Open a case study source file in the editor

Description

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).

Usage

openCaseStudy(id, dest_dir = getwd(), overwrite = FALSE)

opencs(id, dest_dir = getwd(), overwrite = FALSE)

ocs(id, dest_dir = getwd(), overwrite = FALSE)

Value

Invisibly returns the path to the copied file.

Arguments

id

Case study identifier. Flexible formats are accepted, including "CS9_2", "CS9.2", "9_2", or "9.2".

dest_dir

Directory to copy the case study into. Defaults to the current working directory.

overwrite

Logical; overwrite an existing file in dest_dir.

Examples

Run this code
if (FALSE) {
openCaseStudy("2.1")
}

Run the code above in your browser using DataLab