text_drake_graph {drake} | R Documentation |
Show a workflow graph as text in your terminal window.
Description
This is a low-tech version of vis_drake_graph()
and friends. It is designed for when you do not have access
to the usual graphics devices for viewing visuals in an interactive
R session: for example, if you are logged into a remote machine
with SSH and you do not have access to X Window support.
Usage
text_drake_graph(
...,
from = NULL,
mode = c("out", "in", "all"),
order = NULL,
subset = NULL,
targets_only = FALSE,
make_imports = TRUE,
from_scratch = FALSE,
group = NULL,
clusters = NULL,
show_output_files = TRUE,
nchar = 1L,
print = TRUE,
config = NULL
)
Arguments
... |
Arguments to |
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 |
targets_only |
Logical, whether to skip the imports and only include the targets in the workflow plan. |
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
|
nchar |
For each node, maximum number of characters of the node label
to show. Can be 0, in which case each node is a colored box
instead of a node label.
Caution: |
print |
Logical. If |
config |
Deprecated. |
Value
A visNetwork
graph.
See Also
render_text_drake_graph()
, vis_drake_graph()
,
sankey_drake_graph()
, drake_ggraph()
Examples
## Not run:
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.
pkg <- requireNamespace("txtplot", quietly = TRUE) &&
requireNamespace("visNetwork", quietly = TRUE)
if (pkg) {
text_drake_graph(my_plan)
make(my_plan) # Run the project, build the targets.
text_drake_graph(my_plan) # The black nodes from before are now green.
}
}
})
## End(Not run)