Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Conversion

Conversion to a simple or multi graph


Description

Constructs a single graph resulting from merging one or more layers of the network and converts it into an iGraph object.

Usage

## S3 method for class 'Rcpp_RMLNetwork'
as.igraph(x, layers = NULL, merge.actors = TRUE, all.actors = FALSE, ...)

Arguments

x

A multilayer network.

layers

A vector of names of layers. If NULL, all layers are included in the result.

merge.actors

Whether the vertices corresponding to each actor should be merged into a single vertex (true) or kept separated (false).

all.actors

Whether all actors in the multilayer network should be included in the result (true) or only those present in at least one of the input layers (false).

...

Additional arguments. None currently.

Value

An object of class iGraph.

See Also

Examples

net <- ml_aucs()
# using the default merge.actors=TRUE we create a multigraph,
# where each actor corresponds to a vertex in the result
multigraph <- as.igraph(net)
# this is a simple graph corresponding to the facebook layer
facebook1 <- as.igraph(net, "facebook")
# this includes also the actors without a facebook account
facebook2 <- as.igraph(net, "facebook", all.actors=TRUE)
# two layers are converted to an igraph object, where two
# vertices are used for each actor: one corresponding to the
# vertex on facebook, one to the vertex on lunch
f_l_net <- as.igraph(net, c("facebook","lunch"),
    merge.actors=FALSE)

multinet

Analysis and Mining of Multilayer Social Networks

v3.3.2
GPL
Authors
Matteo Magnani, Luca Rossi (API design), Obaida Hanteer (mdlpa, flat_ec, flat_nw, some community eval. functions), Davide Vega (API and code design), Mikael Dubik (glouvain). The package uses functions from eclat (www.borgelt.net/eclat.html), for association rule mining, Eigen (eigen.tuxfamily.org) and spectra (https://spectralib.org), for matrix manipulation, Infomap (www.mapequation.org), for the Infomap community detection method, and Howard Hinnant's date and time library (https://github.com/HowardHinnant/date). The code from these libraries has been included in our source package.
Initial release
2021-01-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.