View source: R/text_drake_graph.R
render_text_drake_graph | R Documentation |
drake_graph_info()
output.
This function is called inside
text_drake_graph()
, which typical users
call more often. See ?text_drake_graph
for details.
render_text_drake_graph(graph_info, nchar = 1L, print = TRUE)
graph_info |
List of data frames generated by
|
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 |
The lines of text in the visualization.
text_drake_graph()
, vis_drake_graph()
,
sankey_drake_graph()
, drake_ggraph()
## Not run:
isolate_example("Quarantine side effects.", {
if (suppressWarnings(require("knitr"))) {
load_mtcars_example() # Get the code with drake_example("mtcars").
pkgs <- requireNamespace("txtplot", quietly = TRUE) &&
requireNamespace("visNetwork", quietly = TRUE)
if (pkgs) {
# Instead of jumpting right to vis_drake_graph(), get the data frames
# of nodes, edges, and legend nodes.
text_drake_graph(my_plan) # Jump straight to the interactive graph.
# Get the node and edge info that vis_drake_graph() just plotted:
graph <- drake_graph_info(my_plan)
# You can pass the data frames right to render_text_drake_graph().
render_text_drake_graph(graph)
}
}
})
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.