mode_transformation {multinets} | R Documentation |
2-mode to 1-mode transformation
Description
This function is a wrapper to the bipartite_projection
function from the 'igraph' package. It transforms a bipartite (2-mode)
network to two 1-mode networks. It is recommended to use it as an analysis
tool for a bipartite network that was obtained from
extract_mesolevel
.
Usage
mode_transformation(x, which = c("both", "high", "low"))
Arguments
x |
a bipartite graph object. Data must be bipartite and must not be multilevel |
which |
one of "both", "high" or "low". High indicates to do the transformation to the higher level. Low indicates to do the transformation to the lower level. Both returns a list with both networks. |
Details
The function counts 1 edge when two vertices of the higher level share a vertex of the lower level and 1 edge when two vertices of the lower level are affiliated to the same vertex in the higher level.
Value
If which is set to "both" (default), returns a list with two generated networks. If which is set to "high" or "low", returns a graph object.
Author(s)
Neylson Crepalde, neylsoncrepalde@gmail.com
Examples
# First, extract the mesolevel of the multilevel network
affiliation <- extract_mesolevel(linked_sim)
# To obtain both transformed networks
transformed <- mode_transformation(affiliation)
# To obtain just one transformed network
high_transformed <- mode_transformation(affiliation, which = "high")