create.multiplexHet is a function to create a multiplex and heterogeneous network (MultiplexHet object). It combines a multiplex network composed from 1 (monoplex case) up to 6 layers with another single network whose nodes are of different nature. See more details below.

create.multiplexHet(...)

# S3 method for default
create.multiplexHet(
  Multiplex_object_1,
  Multiplex_object_2,
  Nodes_relations,
  ...
)

Arguments

...

Further arguments passed to create.multiplexHet

Multiplex_object_1

First Multiplex network (Multiplex object) generated by the function create.multiplex. This multiplex network will be integrated as the first network of the heterogeneous network.

Multiplex_object_2

Second Multiplex network (Multiplex object) generated by the function create.multiplex. This multiplex network will be integrated as the first network of the heterogeneous network.

Nodes_relations

A data frame containing the relationships (bipartite interactions) between the nodes of the first multiplex network and the nodes of the second multiplex of the heterogeneous system. The data frame should contain two or three columns: the first one with the nodes of the multiplex network; the second one with the nodes of the second network. The third one is not mandatory and it should contain the weights. Every node should be present in their corresponding multiplex network.

Value

A Multiplex Heterogeneous object. It contains a list of the different graphs integrating the multiplex network, the names and number of its nodes and the number of layers. In addition, it contains the graph of the second network integrating the heterogeneous network along with its number of nodes Finally, it contains a expanded bipartite adjacency matrix describing the relations of the nodes in every layer of the multiplex network with the nodes of the second network.

Details

A multiplex network is a collection of layers (monoplex networks) sharing the same nodes, but in which the edges represent relationships of different nature. A heterogeneous network is composed of two single networks where the nodes are of different nature. These nodes of different nature are linked through bipartite interactions.

See also

Author

Alberto Valdeolivas Urbelz alvaldeolivas@gmail.com

Examples

m1 <- igraph::graph(c(1,2,1,3,2,3), directed = FALSE) m2 <- igraph::graph(c(1,3,2,3,3,4,1,4), directed = FALSE) multiObject_1 <- create.multiplex(list(m1=m1,m2=m2)) h1 <- igraph::graph(c("A","C","B","E","E","D","E","C"), directed = FALSE) bipartite_relations <- data.frame(m=c(1,3),h=c("A","E")) multiObject_2 <- create.multiplex(list(h1=h1)) create.multiplexHet(multiObject_1, multiObject_2,bipartite_relations)
#> checking input arguments...
#> Generating bipartite matrix...
#> Expanding bipartite matrix to fit the multiplex network...
#> Number of Layers Multiplex 1: #> [1] 2 #> #> Number of Nodes Multiplex 1: #> [1] 4 #> #> IGRAPH 1b7614b UNW- 4 3 -- #> + attr: name (v/n), weight (e/n), type (e/c) #> + edges from 1b7614b (vertex names): #> [1] 1--2 1--3 2--3 #> #> IGRAPH 1b7614b UNW- 4 4 -- #> + attr: name (v/n), weight (e/n), type (e/c) #> + edges from 1b7614b (vertex names): #> [1] 1--3 1--4 2--3 3--4 #> #> Number of Layers Multiplex 2: #> [1] 1 #> #> Number of Nodes Multiplex 2: #> [1] 5 #> #> IGRAPH 1b76fe7 UNW- 5 4 -- #> + attr: name (v/c), weight (e/n), type (e/c) #> + edges from 1b76fe7 (vertex names): #> [1] A--C C--E B--E E--D