LinkDensities {linkcomm}R Documentation

Calculate Link Community Link Densities

Description

This function calculates link densities for link communities.

Usage

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

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

where e_{i} is the number of edges in community i and n_{i} is the number of nodes in community i.

Value

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

Author(s)

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

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.

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)

[Package linkcomm version 1.0-14 Index]