Join graphs on common nodes
This graph-specific join method makes a full join on the nodes data and
updates the edges in the joining graph so they matches the new indexes of the
nodes in the resulting graph. Node and edge data is combined using
dplyr::bind_rows()
semantic, meaning that data is matched by column name
and filled with NA
if it is missing in either of the graphs.
graph_join(x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ...)
x |
A |
y |
An object convertible to a |
by |
A character vector of variables to join by. If To join by different variables on To join by multiple variables, use a vector with length > 1.
For example, To perform a cross-join, generating all combinations of |
copy |
If |
suffix |
If there are non-joined duplicate variables in |
... |
Other parameters passed onto methods. |
A tbl_graph
containing the merged graph
gr1 <- create_notable('bull') %>% activate(nodes) %>% mutate(name = letters[1:5]) gr2 <- create_ring(10) %>% activate(nodes) %>% mutate(name = letters[4:13]) gr1 %>% graph_join(gr2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.