R/vis_drake_graph.R
vis_drake_graph.Rd
It is good practice to visualize the dependency graph before running the targets.
vis_drake_graph( ..., file = character(0), selfcontained = FALSE, build_times = "build", digits = 3, targets_only = FALSE, font_size = 20, layout = NULL, main = NULL, direction = NULL, hover = FALSE, navigationButtons = TRUE, from = NULL, mode = c("out", "in", "all"), order = NULL, subset = NULL, ncol_legend = 1, full_legend = FALSE, make_imports = TRUE, from_scratch = FALSE, group = NULL, clusters = NULL, show_output_files = TRUE, collapse = TRUE, on_select_col = NULL, on_select = NULL, level_separation = NULL, config = NULL )
... | Arguments to |
---|---|
file | Name of a file to save the graph.
If |
selfcontained | Logical, whether
to save the |
build_times | Character string or logical.
If character, the choices are
1. |
digits | Number of digits for rounding the build times |
targets_only | Logical, whether to skip the imports and only include the targets in the workflow plan. |
font_size | Numeric, font size of the node labels in the graph |
layout | Deprecated. |
main | Character string, title of the graph. |
direction | Deprecated. |
hover | Logical, whether to show text (file contents, commands, etc.) when you hover your cursor over a node. |
navigationButtons | Logical, whether to add navigation buttons with
|
from | Optional collection of target/import names.
If |
mode | Which direction to branch out in the graph
to create a neighborhood around |
order | How far to branch out to create
a neighborhood around |
subset | Optional character vector.
Subset of targets/imports to display in the graph.
Applied after |
ncol_legend | Number of columns in the legend nodes.
To remove the legend entirely, set |
full_legend | Logical. If |
make_imports | Logical, whether to make the imports first.
Set to |
from_scratch | Logical, whether to assume all the targets
will be made from scratch on the next |
group | Optional character scalar, name of the column used to
group nodes into columns. All the columns names of your original |
clusters | Optional character vector of values to cluster on.
These values must be elements of the column of the |
show_output_files | Logical, whether to include
|
collapse | Logical, whether to allow nodes to collapse
if you double click on them.
Analogous to |
on_select_col | Optional string corresponding to the column name
in the plan that should provide data for the |
on_select | defines node selection event handling.
Either a string of valid JavaScript that may be passed to
|
level_separation | Numeric, |
config | Deprecated. |
A visNetwork
graph.
For enhanced interactivity in the graph, see the mandrake
package: https://github.com/matthewstrasiotto/mandrake.
if (FALSE) { isolate_example("Quarantine side effects.", { if (suppressWarnings(require("knitr"))) { load_mtcars_example() # Get the code with drake_example("mtcars"). # Plot the network graph representation of the workflow. if (requireNamespace("visNetwork", quietly = TRUE)) { vis_drake_graph(my_plan) make(my_plan) # Run the project, build the targets. vis_drake_graph(my_plan) # The red nodes from before are now green. # Plot a subgraph of the workflow. vis_drake_graph( my_plan, from = c("small", "reg2") ) } } }) }