union2: Merge two graphs

Description Usage Arguments Details Value See Also Examples

View source: R/union2.R

Description

Merges two graphs maintaining whilst their attributes.

Usage

1
union2(g1, g2)

Arguments

g1

Igraph object

g2

Igraph object

Details

This function is an upgrade to the igraph function "union". It creates the union of two networks, and merges attributes with the same name. In the original union the graph attributes were lost. In the case where there are overlapping nodes the attributes of g1 take precedence

Value

A new graph object

See Also

union.igraph

Examples

1
2
union2(g1,g2)
Reduce(union2, list(g1,g2,g3))

JonnoB/PowerGridNetworking documentation built on Aug. 7, 2021, 3:04 a.m.