Learn R Programming

DiagrammeR (version 0.8.4)

combine_graphs: Combine two graphs into a single graph

Description

Combine two graphs in order to make a new graph, merging nodes and edges in the process. The use of an optional data frame allows for new edges to be formed across the combined graphs.

Usage

combine_graphs(x, y, edges_df = NULL)

Arguments

x
a DiagrammeR graph object to which another graph will be joined. This graph should be considered the host graph as the resulting graph will retain only the attributes of this graph.
y
a DiagrammeR graph object that is to be joined with the graph suppled as x.
edges_df
an optional edge data frame that allows for connections between nodes across the graphs to be combined.

Value

a graph object of class dgr_graph.