LinkDensities: Calculate Link Community Link Densities

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/linkcomm_misc.R

Description

This function calculates link densities for link communities.

Usage

1
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} = (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

1
2
3
4
5
6
## Generate graph and extract link communities.
g <- swiss[,3:4]
lc <- getLinkCommunities(g)

## Calculate link densities.
ld <- LinkDensities(lc)

linkcomm documentation built on Feb. 4, 2021, 5:05 p.m.