getEdgesIn {linkcomm} | R Documentation |
Extract Edge Indices from Communities
Description
This function returns edge indices that belong to certain communities or that are incident upon certain nodes.
Usage
getEdgesIn(x, clusterids = 1, nodes = NULL, all = FALSE)
Arguments
x |
An object of class |
clusterids |
An integer vector of community IDs. Defaults to community 1. |
nodes |
A character vector specifying node(s) for which edge indices should be returned. Overrides |
all |
Logical, whether the edges for all communities to which the named nodes belong should be returned. Will have an effect only if |
Value
An integer vector of edge indices.
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.
Examples
## Generate graph and extract link communities.
g <- swiss[,3:4]
lc <- getLinkCommunities(g)
## Get edges from community 1.
getEdgesIn(lc)