Learn R Programming

SticsRFiles (version 1.7.0)

download_data: Download example USMs

Description

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

Usage

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

Value

The path of the folder data have been downloaded into or NULL if the download fails and raise_error is 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)

Examples

Run this code

# 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")
# raising an error instead of a message
download_data(
  example_dirs = "study_case_1", stics_version = "V9.0",
  raise_error = TRUE
)

Run the code above in your browser using DataLab