Skip to contents

get_scdrake_default_options() returns a list of default scdrake options passed to options() during the package load.

get_scdrake_options() returns a list of options currently used by scdrake (their names begin with "scdrake_").

Usage

get_scdrake_default_options(verbose = TRUE)

get_scdrake_options()

Arguments

verbose

A logical scalar: if TRUE, be verbose.

Value

A named list of options.

Details

Most of the options are obtained from environment variables named in UPPERCASE, e.g. the value of scdrake_verbose is taken from SCDRAKE_VERBOSE. The environment variables are coerced to atomic types (character, logical, integer, double).

The following options are used by scdrake:

  • scdrake_yq_binary (character, default: Sys.which("yq"))

  • scdrake_verbose (logical, env: SCDRAKE_VERBOSE, default: TRUE)

    • If TRUE, scdrake will be verbose.

  • scdrake_cache_dir (character, env: SCDRAKE_CACHE_DIR, default: ".drake")

    • A path to drake cache directory. The drake package also contains an RStudio addin, which has a shortcut for loading a target under cursor (see Tools -> Modify Keyboard Shortcuts -> "loadd target under cursor"). To know which cache directory to use for loading, drake is using the rstudio_drake_cache option. On its load or attach, scdrake will automatically set this option to scdrake_cache_dir. Just keep in mind that rstudio_drake_cache option will be overwritten if you load the drake package.

  • scdrake_pipeline_config_dir (character, env: SCDRAKE_PIPELINE_CONFIG_DIR, default: "config")

    • A path to directory containing pipeline.default.yaml and/or pipeline.yaml files.

  • scdrake_single_sample_config_dir (character, env: SCDRAKE_SINGLE_SAMPLE_CONFIG_DIR, default: "config/single_sample")

  • scdrake_integration_config_dir (character, env: SCDRAKE_INTEGRATION_CONFIG_DIR, default: "config/integration")

  • scdrake_plan_custom_file (character, env: SCDRAKE_PLAN_CUSTOM_FILE, default: "plan_custom.R")

    • A path to file with custom drake plan.

  • scdrake_project_root (character, env: SCDRAKE_PROJECT_ROOT, default: .)

    • A path to scdrake project root. If different from the current working directory (.), scdrake will first change the working directory before pipeline is run in e.g. run_single_sample_r() or run_single_sample(). That means other path-specifying options (e.g. scdrake_pipeline_config_dir) and config parameters will become relative to scdrake_project_root - use at your own risk!