Learn R Programming

drake (version 5.3.0)

deps_targets: List the dependencies of one or more targets

Description

Unlike deps_code(), deps_targets() just lists the jobs that lie upstream of the targets on the workflow graph, and file_out() files are not included.

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.

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