newLinkCommsAt {linkcomm} | R Documentation |
User-Defined Link Communities
Description
This function allows the user to extract link communities by cutting the dendrogram at a specified height.
Usage
newLinkCommsAt(x, cutat = 0.5)
Arguments
x |
An object of class |
cutat |
A numerical value indicating the height at which to cut the dendrogram. Defaults to 0.5. |
Details
Users may wish to explore the communities formed by cutting the dendrogram higher or lower than the maximum partition density height. After cutting at a new height, the pdmax
value in the resulting object will be set to the cutat
value used by the user, only to distinguish the new object from the one generated by the link communities algorithm (the global partition density maximum does not change).
Value
An object of class linkcomm
, which is a list containing the following components:
numbers |
An integer vector with the number of edges, nodes, and communities. |
hclust |
An object of class |
pdmax |
A numerical value indicating the height of the dendrogram at which the partition density is maximised. |
pdens |
A numerical matrix with 2 columns; the first is the heights at which clusters appear and the second is the partition density. |
nodeclusters |
A data frame consisting of 2 columns; the first contains node names, and the second contains single community IDs for each node. All communities and their nodes are represented, but not necessarily all nodes. |
clusters |
A list of integer vectors containing the link IDs that belong to each community. Community IDs are the numerical position of the communities in the list. |
edges |
A data frame with 3 columns; the first two contain nodes that interact with each other, and the third is an integer vector of community IDs indicating community membership for each link. |
numclusters |
A named integer vector. Names are node names and integer values are the number of communities to which each node belongs. |
clustsizes |
A named integer vector. Names are community IDs and integer values indicate the number of nodes that belong in each community. |
igraph |
An object of class |
edgelist |
A character matrix with 2 columns containing the nodes that interact with each other. |
directed |
Logical indicating whether the network is directed. |
bipartite |
Logical indicating whether the network is bipartite. |
Note
After cutting at a new height, the pdmax
value in the resulting object will be set to the cutat
value used by the user, only to distinguish the new object from the one generated by the link communities algorithm (the global partition density maximum does not change).
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
Examples
## Generate graph and extract link communities.
g <- swiss[,3:4]
lc <- getLinkCommunities(g)
## User defined communities.
lc2 <- newLinkCommsAt(lc, cutat = 0.8)