An integer vector of community IDs. Defaults to all communities.
conn
A character string naming the connectedness measure to use. Can be one of "conn" or "mod" (see Details below). Defaults to "conn".
normalise
Logical, whether to normalise community connectedness measures by the number of nodes in individual communities. Defaults to TRUE.
verbose
Logical, whether to display the progress of the calculation on the screen. Defaults to FALSE.
Value
A named numerical vector, where the names are community IDs and the numbers are community connectedness or modularity scores.
Details
The connectedness and modularity of different communities indicates whether a particular community is bridging several other communities, or existing as a relatively isolated module. The modularity of community i is
$$M_{i}=\left(\frac{e_{w}(i)}{n_{i}(n_{i}-1)/2}\right).\left(\frac{e_{b}(i)}{n_{i}\hat{d}}\right)^{-1}$$
where \(e_{w}(i)\) is the number of edges within community i, \(e_{b}(i)\) is the number of edges community i makes to other communities, \(n_{i}\) is the number of nodes in community i, and \(\hat{d}\) is the average degree in the network. Community connectedness is the inverse of this value.
References
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. Bioinformatics27, 2011-2012.
# NOT RUN {## Generate graph and extract link communities.g <- swiss[,3:4]
lc <- getLinkCommunities(g)
## Get community connectedness.cc <- getCommunityConnectedness(lc, normalise = FALSE)
# }