View source: R/tar_select_names.R
tar_select_names | R Documentation |
Select the names of targets from a target list.
tar_select_names(targets, ...)
targets |
A list of target objects as described in the "Target objects" section. It does not matter how nested the list is as long as the only leaf nodes are targets. |
... |
One or more comma-separated |
A character vector of target names.
Most tarchetypes
functions are target factories,
which means they return target objects
or lists of target objects.
Target objects represent skippable steps of the analysis pipeline
as described at https://books.ropensci.org/targets/.
Please read the walkthrough at
https://books.ropensci.org/targets/walkthrough.html
to understand the role of target objects in analysis pipelines.
For developers, https://wlandau.github.io/targetopia/contributing.html#target-factories explains target factories (functions like this one which generate targets) and the design specification at https://books.ropensci.org/targets-design/ details the structure and composition of target objects.
Other target selection:
tar_select_targets()
if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
targets::tar_dir({ # tar_dir() runs code from a temporary directory.
targets <- list(
list(
targets::tar_target(x, 1),
targets::tar_target(y1, 2)
),
targets::tar_target(y2, 3),
targets::tar_target(z, 4)
)
tar_select_names(targets, starts_with("y"), contains("z"))
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.