Path to the archived target script file
tar_archive_script(
package,
pipeline,
envir = parent.frame(),
script = targets::tar_config_get("script")
)A scalar character of the path to the archived target script file.
A scalar character of the package name.
A scalar character of the pipeline name.
An environment, where to run the target R script
(default: _targets.R) if callr_function is NULL.
Ignored if callr_function is anything other than NULL.
callr_function should only be NULL for debugging and
testing purposes, not for serious runs of a pipeline, etc.
The envir argument of tar_make() and related
functions always overrides
the current value of tar_option_get("envir") in the current R session
just before running the target script file,
so whenever you need to set an alternative envir, you should always set
it with tar_option_set() from within the target script file.
In other words, if you call tar_option_set(envir = envir1) in an
interactive session and then
tar_make(envir = envir2, callr_function = NULL),
then envir2 will be used.
Character of length 1, path to the
target script file. Defaults to tar_config_get("script"),
which in turn defaults to _targets.R. When you set
this argument, the value of tar_config_get("script")
is temporarily changed for the current function call.
See tar_script(),
tar_config_get(), and tar_config_set() for details
about the target script file and how to set it
persistently for a project.