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

Navigation

Functions to extract neighbors of vertices, to navigate the network


Description

These functions return actors who are connected to the input actor through an edge. They can be used to navigate the graph, following paths inside it.

Usage

neighbors_ml(n, actor, layers = character(0), mode = "all")
xneighbors_ml(n, actor, layers = character(0), mode = "all")

Arguments

n

A multilayer network.

actor

An actor name present in the network, whose neighbors are extracted.

layers

An array of layers belonging to the network. Only the nodes in these layers are returned. If the array is empty, all the nodes in the network are returned.

mode

This argument can take values "in", "out" or "all" to indicate respectively neighbors reachable via incoming edges, via outgoing edges or both.

Value

neighbors_ml returns the actors who are connected to the input actor on at least one of the specified layers. xneighbors_ml (eXclusive neighbors) returns the actors who are connected to the input actor on at least one of the specified layers, and on none of the other layers. Exclusive neighbors are those neighbors that would be lost by removing the input layers.

References

Berlingerio, Michele, Michele Coscia, Fosca Giannotti, Anna Monreale, and Dino Pedreschi. 2011. "Foundations of Multidimensional Network Analysis." In International Conference on Social Network Analysis and Mining (ASONAM), 485-89. IEEE Computer Society.

See Also

Examples

net <- ml_aucs()
# out-neighbors of U54, that is, all A such that there is an edge ("U54",A)
neigh <- neighbors_ml(net, "U54", mode="out")
# all in-neighbors of U54 on the "work" layer who are not in-neighbors
# in any other layer
xneigh <- xneighbors_ml(net, "U54", "work", mode="in")
# all neighbors (in- and out-) of U54 on the "work" and "lunch" layers
# who are not neighbors in any other layer
xneigh <- xneighbors_ml(net, "U54", c("work","lunch"))

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.