mode_transformation: 2-mode to 1-mode transformation

Description Usage Arguments Details Value Author(s) Examples

View source: R/mode_transformation.R

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

1
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

1
2
3
4
5
6
7
8
# 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")

neylsoncrepalde/multinets documentation built on Dec. 17, 2019, 11:46 p.m.