getEdgesIn function

Extract Edge Indices from Communities

Extract Edge Indices from Communities

This function returns edge indices that belong to certain communities or that are incident upon certain nodes.

getEdgesIn(x, clusterids = 1, nodes = NULL, all = FALSE)

Arguments

  • x: An object of class linkcomm or OCG.
  • 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 clusterids. Defaults to NULL.
  • all: Logical, whether the edges for all communities to which the named nodes belong should be returned. Will have an effect only if nodes is not NULL. If FALSE, edges that are directly incident upon the named nodes will be returned. Defaults to FALSE.

Returns

An integer vector of edge indices.

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.

Author(s)

Alex T. Kalinka alex.t.kalinka@gmail.com

Examples

## Generate graph and extract link communities. g <- swiss[,3:4] lc <- getLinkCommunities(g) ## Get edges from community 1. getEdgesIn(lc)
  • Maintainer: Alex T. Kalinka
  • License: GPL (>= 2)
  • Last published: 2021-02-04