Learn R Programming

drake (version 5.0.0)

build_drake_graph: Create the igraph dependency network of your project.

Description

This function returns an igraph object representing how the targets in your workflow plan data frame depend on each other. (help(package = "igraph")). To plot the graph, call to plot.igraph() on your graph, or just use vis_drake_graph() from the start.

Usage

build_drake_graph(plan = drake_plan(),
  targets = drake::possible_targets(plan), envir = parent.frame(),
  verbose = 1, jobs = 1)

Arguments

plan

workflow plan data frame, same as for function make().

targets

names of targets to build, same as for function make().

envir

environment to import from, same as for function make().

verbose

logical, whether to output messages to the console.

jobs

number of jobs to accelerate the construction of the dependency graph. A light mclapply-based parallelism is used if your operating system is not Windows.

Value

An igraph object representing the workflow plan dependency network.

See Also

vis_drake_graph

Examples

Run this code
# NOT RUN {
test_with_dir("Quarantine side effects.", {
load_basic_example() # Get the code with drake_example("basic").
# Make the igraph network connecting all the targets and imports.
g <- build_drake_graph(my_plan)
class(g) # "igraph"
})
# }

Run the code above in your browser using DataLab