dataframes_graph()
.R/plot_graph.R
This function is called inside
vis_drake_graph()
, which typical users
call more often.
render_drake_graph(graph_dataframes, file = character(0), layout = "layout_with_sugiyama", direction = "LR", hover = TRUE, main = graph_dataframes$default_title, selfcontained = FALSE, navigationButtons = TRUE, ncol_legend = 1, ...)
graph_dataframes | list of data frames generated by
|
---|---|
file | Name of HTML file to save the graph.
If |
layout | name of an igraph layout to use, such as 'layout_with_sugiyama' or 'layout_as_tree'. Be careful with 'layout_as_tree': the graph is a directed acyclic graph, but not necessarily a tree. |
direction | an argument to |
hover | logical, whether to show the command that generated the target when you hover over a node with the mouse. For imports, the label does not change with hovering. |
main | character string, title of the graph |
selfcontained | logical, whether
to save the |
navigationButtons | logical, whether to add navigation buttons with
|
ncol_legend | number of columns in the legend nodes.
To remove the legend entirely, set |
... | arguments passed to |
A visNetwork graph.
# NOT RUN { test_with_dir("Quarantine side effects.", { load_basic_example() # Get the code with drake_example("basic"). # Instead of jumpting right to vis_drake_graph(), get the data frames # of nodes, edges, and legend nodes. config <- drake_config(my_plan) # Internal configuration list graph <- dataframes_graph(config) # You can pass the data frames right to render_drake_graph() # (as in vis_drake_graph()) or you can create # your own custom visNewtork graph. render_drake_graph(graph, width = '100%') # Width is passed to visNetwork. }) # }