R/examples.R
Copy a folder of code files for a
drake example to the current working directory.
Call drake_example("basic")
to generate the code files from the
basic example vignette: vignette("example-basic")
.
To see the names of all the examples, run drake_examples()
.
drake_example(example = drake::drake_examples(), to = getwd(), destination = NULL, overwrite = FALSE)
example | name of the example.
To see all the available example names,
run |
---|---|
to | Character scalar, file path, where to write the folder containing the code files for the example. |
destination | Deprecated, use |
overwrite | Logical, whether to overwrite an existing folder with the same name as the drake example. |
NULL
drake_examples()
, make()
,
shell_file()
, drake_batchtools_tmpl_file()
# NOT RUN { test_with_dir("Quarantine side effects.", { drake_examples() # List all the drake examples. # Sets up the same example as the basic example vignette. drake_example("basic") # Sets up the SLURM example. drake_example("slurm") }) # }