cutDendrogramAt: Extract Meta-Communities

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

View source: R/linkcomm_misc.R

Description

This function extracts meta-communities from a dendrogram of community relatedness based on a user-defined place at which to cut the dendrogram.

Usage

1
2
3
cutDendrogramAt(x, lc = NULL, cutat = NULL, plot = TRUE, col = TRUE, 
                pal = brewer.pal(9, "Set1"), labels = FALSE, plotcut = TRUE, 
                right = TRUE, verbose = TRUE, ...)

Arguments

x

An object of class hclust, usually generated by getClusterRelatedness.

lc

An object of class linkcomm. If included, the resulting plot will display additional information about the clusters. Defaults to NULL.

cutat

A numerical value at which to cut the dendrogram.

plot

Logical, whether to plot the dendrogram and the meta-communities, defaults to TRUE.

col

Logical, whether to colour the meta-communites.

pal

A character vector describing a colour palette to be used for colouring the meta-communites in the dendrogram plot. Defaults to brewer.pal(9, "Set1").

labels

Logical, whether to put labels on the dendrogram. Defaults to FALSE.

plotcut

Logical, whether to display a horizontal line where the dendrogram is cut. Defaults to TRUE.

right

Logical, whether to orient the dendrogram to the right. Defaults to TRUE.

verbose

Logical, whether to display the progress of colouring the dendrogram. Defaults to TRUE.

...

Additional arguments to be passed to plot.

Details

Extracting meta-communities allows the user to explore community relatedness and structure at higher levels.

Value

A list of integer vectors, referring to meta-communities of link communities.

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

getClusterRelatedness

Examples

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

## Cut dendrogram at 1 and extract meta-communities.
cutDendrogramAt(hc, cutat = 1)

alextkalinka/linkcomm documentation built on Feb. 11, 2021, 4:53 a.m.