Description Usage Arguments Value Author(s) Examples
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.
1 | add_layer(multiplex, g)
|
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. |
The multiplex graph with the layer added
Issam Falih <issam.falih@lipn.univ-paris13.fr>
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.