lr_modularity: LinkRank Modularity

Description Usage Arguments References Examples

View source: R/lr_modularity.R

Description

Calculates the LinkRank modularity (Kim et al. 2010) of a graph partition

Usage

1
lr_modularity(g, partition, damping = 0.85, pr_algo = "prpack", weight = NULL)

Arguments

g

a igraph object

partition

a graph partition; should be an integer or character vector of memberships or a igraph::communities object

damping

damping factor (1 - teleportation prob.)

pr_algo

algorithm to calculate Perron vector; should be one of "prpack", "arpack", and "power"; defaults to "prpack".

weight

if NULL and g has a weight edge-attribute, then it is used. If weights is a numerical vector, with length equal igraph::ecount(g), then it will be used even if the object g has a weight edge-attribute. If weight is NA, then no weights will be used, regardless of the attributes of g.

References

Kim, Y., S.W. Son, H. Jeong. 2010. "Finding Communities in Directed Networks," Physical Review E, 81.

Examples

1
2
3
4
data(sampson3, package = "btoolbox")

com = igraph::vertex_attr(sampson3, "group")
lr_modularity(sampson3, com)

baruuum/btoolbox documentation built on Aug. 17, 2020, 1:29 a.m.