Directory path to the support scripts of the current target script
Source:R/tar_path_script_support.R
tar_path_script_support.Rd
Identify the directory path to the support scripts of the current target script of the pipeline currently running.
Value
Character, directory 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")
.
Details
A target script (default: _targets.R
) comes with
support scripts if it is written by Target Markdown.
These support scripts usually live in a folder called _targets_r/
,
but the path may vary from case to case. The
tar_path_scipt_support()
returns the path to
the folder with the support scripts.
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()
,
tar_path_store()
,
tar_path_target()
,
tar_source()
,
tar_store()
,
tar_unblock_process()
Examples
tar_path_script_support()
#> [1] "_targets_r"
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_support()),
script = script,
ask = FALSE
)
tar_make(script = script)
tar_read(x)
})
}