powered by
Copy or run a textbook chapter script
chapter_script( chapter, type = c("full", "helper"), dest, run = FALSE, overwrite = FALSE, open = FALSE )
Path to the copied script (invisibly if run = TRUE).
Chapter number (e.g., 1, 2, 3).
Script type: "full" or "helper".
Directory to copy the script into.
If TRUE, source() the script after copying.
If TRUE, overwrite an existing file.
If TRUE, attempt to open the copied script in RStudio.
tmp <- tempdir() chapter_script(3, "helper", dest = tmp, overwrite = TRUE) # \donttest{ tmp <- tempdir() chapter_script(3, "helper", dest = tmp, open = TRUE, overwrite = TRUE) # }
Run the code above in your browser using DataLab