tarchives version of targets::tar_manifest(). Returns a data frame of the
targets defined in an archived pipeline's target script file.
Usage
tar_manifest_archive(
package,
pipeline,
names = NULL,
fields = NULL,
drop_missing = TRUE,
callr_function = callr::r,
callr_arguments = targets::tar_callr_args_default(callr_function),
envir = parent.frame(),
script = targets::tar_config_get("script")
)Arguments
- package
A scalar character of the package name.
- pipeline
A scalar character of the pipeline name.
- names
Names of the targets to show. Set to
NULLto show all the targets (default). Otherwise, the object supplied tonamesshould be atidyselectexpression likeany_of()orstarts_with()fromtidyselectitself, ortar_described_as()to select target names based on their descriptions.- fields
Names of the fields, or columns, to show. Set to
NULLto show all the fields (default). Otherwise, the value offieldsshould be atidyselectexpression likestarts_with()to select the columns to show in the output. Possible fields are below. All of them can be set intar_target(),tar_target_raw(), ortar_option_set().name: Name of the target.command: the R command that runs when the target runs.description: custom free-form text description of the target, if available.pattern: branching pattern of the target, if applicable.format: Storage format.repository: Storage repository.iteration: Iteration mode for branching.error: Error mode, what to do when the target fails.memory: Memory mode, when to keep targets in memory.storage: Storage mode for high-performance computing scenarios.retrieval: Retrieval mode for high-performance computing scenarios.deployment: Where/whether to deploy the target in high-performance computing scenarios.priority: Numeric of length 1 between 0 and 1. Controls which targets get deployed first when multiple competing targets are ready simultaneously. Targets with priorities closer to 1 get dispatched earlier (and polled earlier intar_make_future()).resources: A list of target-specific resource requirements fortar_make_future().cue_mode: Cue mode fromtar_cue().cue_depend: Depend cue fromtar_cue().cue_expr: Command cue fromtar_cue().cue_file: File cue fromtar_cue().cue_format: Format cue fromtar_cue().cue_repository: Repository cue fromtar_cue().cue_iteration: Iteration cue fromtar_cue().packages: List columns of packages loaded before running the target.library: List column of library paths to load the packages.
- drop_missing
Logical of length 1, whether to automatically omit empty columns and columns with all missing values.
- callr_function
A function from
callrto start a fresh clean R process to do the work. Set toNULLto run in the current session instead of an external process (but restart your R session just before you do in order to clear debris out of the global environment).callr_functionneeds to beNULLfor interactive debugging, e.g.tar_option_set(debug = "your_target"). However,callr_functionshould not beNULLfor serious reproducible work.- callr_arguments
A list of arguments to
callr_function.- envir
An environment, where to run the target R script (default:
_targets.R) ifcallr_functionisNULL. Ignored ifcallr_functionis anything other thanNULL.callr_functionshould only beNULLfor debugging and testing purposes, not for serious runs of a pipeline, etc.The
envirargument oftar_make()and related functions always overrides the current value oftar_option_get("envir")in the current R session just before running the target script file, so whenever you need to set an alternativeenvir, you should always set it withtar_option_set()from within the target script file. In other words, if you calltar_option_set(envir = envir1)in an interactive session and thentar_make(envir = envir2, callr_function = NULL), thenenvir2will be used.- script
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 oftar_config_get("script")is temporarily changed for the current function call. Seetar_script(),tar_config_get(), andtar_config_set()for details about the target script file and how to set it persistently for a project.
Value
A data frame of information about the targets in the pipeline. Rows appear in topological order (the order they will run without any influence from parallel computing or priorities).
See also
tar_archive_pipelines() to list the pipelines in a package.
Examples
# \donttest{
withr::with_envvar(
c(R_USER_CACHE_DIR = tempfile()),
tar_manifest_archive(package = "tarchives", pipeline = "example-model")
)
#> # A tibble: 2 × 19
#> name command format repository iteration error memory storage retrieval
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 data drop_setosa(… rds local vector stop auto worker auto
#> 2 model lm(Sepal.Wid… rds local vector stop auto worker auto
#> # ℹ 10 more variables: deployment <chr>, priority <dbl>, cue_mode <chr>,
#> # cue_command <lgl>, cue_depend <lgl>, cue_file <lgl>, cue_format <lgl>,
#> # cue_repository <lgl>, cue_iteration <lgl>, packages <list>
# }