Examples for 'igraph::union.igraph'


Union of graphs

Aliases: union.igraph graph.union %u%

Keywords: graphs

### ** Examples


## Union of two social networks with overlapping sets of actors
net1 <- graph_from_literal(D-A:B:F:G, A-C-F-A, B-E-G-B, A-B, F-G,
                  H-F:G, H-I-J)
net2 <- graph_from_literal(D-A:F:Y, B-A-X-F-H-Z, F-Y)
print_all(net1 %u% net2)
IGRAPH c7d8252 UN-- 13 21 -- 
+ attr: name (v/c)
+ edges from c7d8252 (vertex names):
 [1] I--J H--Z H--I G--H G--E F--X F--Y F--H F--C F--G B--E B--G A--X A--C A--F
[16] A--B D--Y D--G D--F D--B D--A

[Package igraph version 1.3.1 Index]