R/graph.R
igraph
objects are used
internally to represent the dependency network of your workflow.
See config(my_plan)$graph
from the basic example.
prune_drake_graph(graph, to = igraph::V(graph)$name, jobs = 1)
graph | An igraph object to be pruned. |
---|---|
to | Character vector, names of the vertices that draw
the line for pruning. The pruning process removes all vertices
downstream of |
jobs | Number of jobs for light parallelism (on non-Windows machines). |
A pruned igraph object representing the dependency network of the workflow.
For a supplied graph, take the subgraph of all combined
incoming paths to the vertices in to
. In other words,
remove the vertices after to
from the graph.
build_drake_graph()
, config()
,
make()
# NOT RUN { test_with_dir("Quarantine side effects.", { load_basic_example() # Get the code with drake_example("basic"). # Build the igraph object representing the workflow dependency network. # You could also use drake_config(my_plan)$graph graph <- build_drake_graph(my_plan) # The default plotting is not the greatest, # but you will get the idea. plot(graph) # Prune the graph: that is, remove the nodes downstream # from 'small' and 'large' pruned <- prune_drake_graph(graph = graph, to = c("small", "large")) plot(pruned) }) # }