drake_ggraph | R Documentation |
ggraph
/ggplot2
This function requires packages ggplot2
and ggraph
.
Install them with install.packages(c("ggplot2", "ggraph"))
.
drake_ggraph(
...,
build_times = "build",
digits = 3,
targets_only = FALSE,
main = NULL,
from = NULL,
mode = c("out", "in", "all"),
order = NULL,
subset = NULL,
make_imports = TRUE,
from_scratch = FALSE,
full_legend = FALSE,
group = NULL,
clusters = NULL,
show_output_files = TRUE,
label_nodes = FALSE,
transparency = TRUE,
config = NULL
)
... |
Arguments to |
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. |
main |
Character string, title of the graph. |
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 |
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 |
full_legend |
Logical. If |
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
|
label_nodes |
Logical, whether to label the nodes.
If |
transparency |
Logical, whether to allow transparency in
the rendered graph. Set to |
config |
Deprecated. |
A ggplot2
object, which you can modify with more layers,
show with plot()
, or save as a file with ggsave()
.
vis_drake_graph()
, sankey_drake_graph()
,
render_drake_ggraph()
, text_drake_graph()
## Not run:
isolate_example("Quarantine side effects.", {
load_mtcars_example() # Get the code with drake_example("mtcars").
# Plot the network graph representation of the workflow.
if (requireNamespace("ggraph", quietly = TRUE)) {
drake_ggraph(my_plan) # Save to a file with `ggplot2::ggsave()`.
}
})
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.