add_layer: Add an igraph graph as a layer to the multiplex

Description Usage Arguments Value Author(s) Examples

Description

Add an igraph graph as a layer to the multiplex network. If there is new nodes in the input graph. These new nodes will be added to the multiplex network.

Usage

1
add_layer(multiplex, g)

Arguments

multiplex

: The multiplex object.

g

: An igraph graph i.e : the inserted layer. Nodes of the added graph should have a "name" attribute. This attribute is used to match already existing nodes.

Value

The multiplex graph with the layer added

Author(s)

Issam Falih <issam.falih@lipn.univ-paris13.fr>

Examples

1
2
3
4
5
6
7
M <- new("Multiplex")
g1 <- graph.famous("Zachary")
g1 <- set.vertex.attribute(g1,name = "name",index = V(g1),value = as.character(V(g1)))
M <- add_layer(M,g1)
g2 <- graph.ring(30)
g2 <- set.vertex.attribute(g2,name = "name",index = V(g2),value = as.character(V(g2)))
M <- add_layer(M,g2)

Issamfalih/MUNA documentation built on May 8, 2019, 11:52 a.m.