drake (version 6.2.1)

drake_example: Download and save the code and data files of an example drake-powered project.

Description

The drake_example() function downloads a folder from https://github.com/wlandau/drake-examples. (Really, it downloads one of the zip files listed at https://github.com/wlandau/drake-examples/tree/gh-pages and unzips it. Do not include the .zip extension in the example argument.)

Usage

drake_example(example = "main", to = getwd(), destination = NULL,
  overwrite = FALSE, quiet = TRUE)

Arguments

example

name of the example. The possible values are the names of the folders at https://github.com/wlandau/drake-examples.

to

Character scalar, the folder containing the code files for the example. passed to the exdir argument of utils::unzip().

destination

Deprecated, use to instead.

overwrite

Logical, whether to overwrite an existing folder with the same name as the drake example.

quiet

logical, passed to downloader::download() and thus utils::download.file(). Whether to download quietly or print progress.

Value

NULL

See Also

drake_examples(), make()

Examples

Run this code
# NOT RUN {
test_with_dir("Quarantine side effects.", {
drake_examples() # List all the drake examples.
# Sets up the same example as https://ropenscilabs.github.io/drake-manual/mtcars.html # nolint
drake_example("mtcars")
# Sets up the SLURM example.
drake_example("slurm")
})
# }

Run the code above in your browser using DataCamp Workspace