# NOT RUN {
test_with_dir("Quarantine side effects.", {
config <- load_mtcars_example() # Get the code with drake_example("mtcars").
# Get a list of data frames representing the nodes, edges,
# and legend nodes of the visNetwork graph from vis_drake_graph().
raw_graph <- dataframes_graph(config = config)
# Choose a subset of the graph.
smaller_raw_graph <- dataframes_graph(
config = config,
from = c("small", "reg2"),
mode = "in"
)
# Inspect the raw graph.
str(raw_graph)
# Use the data frames to plot your own custom visNetwork graph.
# For example, you can omit the legend nodes
# and change the direction of the graph.
library(magrittr)
library(visNetwork)
visNetwork(nodes = raw_graph$nodes, edges = raw_graph$edges) %>%
visHierarchicalLayout(direction = 'UD')
})
# }
Run the code above in your browser using DataLab