Learn R Programming

linkcomm (version 1.0-14)

orderCommunities: 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 linkcomm.

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.

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.

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.

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

Run this code
# NOT RUN {
## Generate graph and extract link communities.
g <- swiss[,3:4]
lc <- getLinkCommunities(g)

## Order communities according to the dendrogram.
orderCommunities(lc)
# }

Run the code above in your browser using DataLab