Learn R Programming

drake (version 5.2.1)

deps_targets: List the dependencies of one or more targets

Description

Intended for debugging and checking your project. The dependency structure of the components of your analysis decides which targets are built and when.

Usage

deps_targets(targets, config = read_drake_config(), reverse = FALSE)

Arguments

targets

a character vector of target names

config

an output list from drake_config()

reverse

logical, whether to compute reverse dependencies (targets immediately downstream) instead of ordinary dependencies.

Value

A character vector, names of dependencies. Files wrapped in escaped double quotes. The other names listed are functions or generic R objects.

Details

Unlike deps_code(), deps_targets() allows you to specify a set of targets and get their dependencies. This assumes you have an output list from drake_config(). which resolves the dependency graph.

See Also

deps_code make drake_plan drake_config

Examples

Run this code
# NOT RUN {
test_with_dir("Quarantine side effects.", {
load_mtcars_example() # Get the code with drake_example("mtcars").
# Dependencies of the knitr-generated targets like 'report.md'
# include targets/imports referenced with `readd()` or `loadd()`.
config <- drake_config(my_plan)
deps_targets(file_store("report.md"), config = config)
deps_targets("regression1_small", config = config)
deps_targets(c("small", "large"), config = config, reverse = TRUE)
})
# }

Run the code above in your browser using DataLab