LinkDensities function

Calculate Link Community Link Densities

Calculate Link Community Link Densities

This function calculates link densities for link communities.

LinkDensities(x, clusterids = 1:x$numbers[3])

Arguments

  • x: An object of class linkcomm.
  • clusterids: An integer vector of community IDs. Defaults to all communities.

Details

The link density of community i is

Di=eini+1(ni(ni1)/2)ni+1Di=(eini+1)/((ni(ni1)/2)ni+1) D_{i}=\frac{e_{i}-n_{i}+1}{(n_{i}(n_{i}-1)/2)-n_{i}+1}D_{i} = (e_{i}-n_{i}+1)/((n_{i}(n_{i}-1)/2)-n_{i}+1)

where eie_{i} is the number of edges in community i and nin_{i} is the number of nodes in community i.

Returns

A named numerical vector, where the names are community IDs and the numbers are link densities.

References

Ahn, Y.Y., Bagrow, J.P., and Lehmann, S. (2010). Link communities reveal multiscale complexity in networks. Nature 466 , 761-764.

Kalinka, A.T. and Tomancak, P. (2011). linkcomm: an R package for the generation, visualization, and analysis of link communities in networks of arbitrary size and type. Bioinformatics 27 , 2011-2012.

Author(s)

Alex T. Kalinka alex.t.kalinka@gmail.com

See Also

plot.linkcomm, plotLinkCommSummComm

Examples

## Generate graph and extract link communities. g <- swiss[,3:4] lc <- getLinkCommunities(g) ## Calculate link densities. ld <- LinkDensities(lc)
  • Maintainer: Alex T. Kalinka
  • License: GPL (>= 2)
  • Last published: 2021-02-04