Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/linkcomm_misc.R
This function returns a measure of how relatively outwardly or inwardly connected a community is.
1 2 | getCommunityConnectedness(x, clusterids = 1:x$numbers[3], conn = "conn",
normalise = TRUE, verbose = FALSE)
|
x |
An object of class |
clusterids |
An integer vector of community IDs. Defaults to all communities. |
conn |
A character string naming the connectedness measure to use. Can be one of |
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. |
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) = (e_{w}(i)/n_{i}(n_{i}-1)/2).(e_{b}(i)/n_{i}*d)^-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.
A named numerical vector, where the names are community IDs and the numbers are community connectedness or modularity scores.
Alex T. Kalinka alex.t.kalinka@gmail.com
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.
1 2 3 4 5 6 | ## Generate graph and extract link communities.
g <- swiss[,3:4]
lc <- getLinkCommunities(g)
## Get community connectedness.
cc <- getCommunityConnectedness(lc, normalise = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.