tar_path_script: Current target script path

View source: R/tar_path_script.R

tar_path_scriptR Documentation

Current target script path

Description

Identify the file path to the target script of the pipeline currently running.

Usage

tar_path_script()

Value

Character, file path to the target script of the pipeline currently running. If called outside of the pipeline currently running, tar_path_script() returns tar_config_get("script").

See Also

Other utilities: tar_active(), tar_backoff(), tar_call(), tar_cancel(), tar_definition(), tar_described_as(), tar_envir(), tar_format_get(), tar_group(), tar_name(), tar_path(), tar_path_script_support(), tar_path_store(), tar_path_target(), tar_source(), tar_store()

Examples

tar_path_script()
if (identical(Sys.getenv("TAR_EXAMPLES"), "true")) { # for CRAN
tar_dir({ # tar_dir() runs code from a temp dir for CRAN.
script <- tempfile()
tar_script(tar_target(x, tar_path_script()), script = script, ask = FALSE)
tar_make(script = script)
tar_read(x)
})
}

targets documentation built on Oct. 3, 2024, 1:11 a.m.