Learn R Programming

targets (version 0.0.0.9000)

tar_manifest: Produce a data frame of information about your targets.

Description

Along with tar_visnetwork() and tar_glimpse(), tar_manifest() helps check that you constructed your pipeline correctly.

Usage

tar_manifest(
  names = NULL,
  fields = c("name", "command", "type", "dimensions"),
  callr_function = callr::r,
  callr_arguments = list()
)

Arguments

names

Names of the targets to show. Set to NULL to show all the targets (default). Otherwise, you can supply symbols, a character vector, or tidyselect helpers like starts_with().

fields

Names of the fields, or columns, to show. Set to NULL to show all the fields (default). Otherwise, you can supply symbols, a character vector, or tidyselect helpers like starts_with(). Set to NULL to print all the fields. The name of the target is always included as the first column regardless of the selection. Possible fields are below. All of them can be set in tar_target(), tar_target_raw(), or tar_option_set().

  • name: Name of the target.

  • command: the R command that runs when the target builds.

  • type: Type of the target, either "stem" (non-pattern) or "map" or "cross" (patterns).

  • dimensions: A list column to name the targets that each pattern branches over. Only applies to patterns.

  • format: Storage format.

  • 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.

  • resources: A list of target-specific resource requirements for tar_make_future().

  • cue_mode: Cue mode from tar_cue().

  • cue_depend: Depend cue from tar_cue().

  • cue_expr: Command cue from tar_cue().

  • cue_file: File cue from tar_cue().

  • cue_format: Format cue from tar_cue().

  • cue_iteration: Iteration cue from tar_cue().

  • packages: List columns of packages loaded before building the target.

  • library: List column of library paths to load the packages.

callr_function

A function from callr to start a fresh clean R process to do the work. Set to NULL to 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_function needs to be NULL for interactive debugging, e.g. tar_option_set(debug = "your_target"). However, callr_function should not be NULL for serious reproducible work.

callr_arguments

A list of arguments to callr_function.

Value

A data frame of information about the targets in the pipeline.

Examples

Run this code
# NOT RUN {
tar_dir({
tar_script({
  tar_option_set()
  tar_pipeline(
    tar_target(y1, 1 + 1),
    tar_target(y2, 1 + 1),
    tar_target(z, y1 + y2),
    tar_target(m, z, pattern = map(z)),
    tar_target(c, z, pattern = cross(z))
  )
})
tar_manifest()
tar_manifest(fields = c("name", "command"))
tar_manifest(fields = "command")
tar_manifest(fields = starts_with("cue"))
})
# }

Run the code above in your browser using DataLab