Download locally the example data from the data repository in the SticsRPacks organization.

download_data(
  branch = NULL,
  out_dir = tempdir(),
  example_dirs = NULL,
  stics_version = "latest",
  raise_error = FALSE
)

Arguments

branch

Git branch name (optional)

out_dir

Path of the directory where to download the data (optional, default: tempdir())

example_dirs

List of use case directories names (optional)

stics_version

Name of the STICS version (optional) The default value is the latest version returned by get_stics_versions_compat().

raise_error

Logical, if TRUE, an error is raised instead of message when FALSE (default)

Value

The path of the folder data have been downloaded into or NULL if the download fails and raise_error is FALSE.

Examples


# Getting data for a given example : study_case_1 and a given STICS version
download_data(example_dirs = "study_case_1", stics_version = "V9.0")
#> [1] "/private/var/folders/36/tjdph2t965j8snz9_vkdnw0r0000gn/T/RtmpwqOMiR/data-master/study_case_1/V9.0"
# raising an error instead of a message
download_data(
  example_dirs = "study_case_1", stics_version = "V9.0",
  raise_error = TRUE
)
#> [1] "/var/folders/36/tjdph2t965j8snz9_vkdnw0r0000gn/T//RtmpwqOMiR/data-master/study_case_1/V9.0"