merge_graphs | R Documentation |
Merge a list of graphs into a single graph. Can take in a list of igraphs or a list of igraphs, and can return a merged tbl_graph or a merged igraph.
merge_graphs(
graph_list,
node_size,
output = c("tidygraph", "igraph"),
by = "ref",
verbose = TRUE
)
graph_list |
A list of graphs. |
node_size |
Strategy for setting node sizes. Can be one of:
|
output |
Output format to return the graph in. |
by |
A join specification created with If To join on different variables between To join by multiple variables, use a
For simple equality joins, you can alternatively specify a character vector
of variable names to join by. For example, To perform a cross-join, generating all combinations of |
verbose |
Print messages. |
Merge tbl_graph or igraph.
set.seed(2023)
graph_list <- example_graphs()
g <- merge_graphs(graph_list)
plot(g, edge.label=igraph::E(g)$color)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.