orderCommunities {linkcomm} | R Documentation |
Order Link Communities According to the Dendrogram
Description
This function returns link communities in the same order as in the hierarchical clustering dendrogram.
Usage
orderCommunities(x, clusterids = 1:x$numbers[3], verbose = TRUE)
Arguments
x |
An object of class |
clusterids |
An integer vector of community IDs. Defaults to all communities. |
verbose |
Logical, whether to print progress of the calculation to the screen. Defaults to TRUE. |
Details
Ordering link communities according to the dendrogram can aid in visualization when plotting them as a Spencer circle because it minimses crossing over between links.
Value
A list with the following components:
ordered |
A list of integer vectors. These are the ordered communities of links. |
clusids |
An integer vector of community IDs in their new order. |
Author(s)
Alex T. Kalinka alex.t.kalinka@gmail.com
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. Bioinformatics 27, 2011-2012.
See Also
plot.linkcomm
, plotLinkCommGraph
Examples
## Generate graph and extract link communities.
g <- swiss[,3:4]
lc <- getLinkCommunities(g)
## Order communities according to the dendrogram.
orderCommunities(lc)