edge.duplicates function

Find and Remove Edge Loops and Duplicates

Find and Remove Edge Loops and Duplicates

This function finds and removes loops, edge duplicates, and bi-directional edges.

edge.duplicates(network, verbose = TRUE)

Arguments

  • network: An edge list, which is either a data frame or a character or integer matrix with two columns.
  • verbose: Logical, whether to display the progress of the function on the screen. Defaults to TRUE.

Details

This function removes loops, duplicate and bi-directional edges; the edges that occur closer to the end of the edge list will be removed.

Returns

A list with the following elements: edges - a character matrix of the edges in the network with any loops or duplicate edges removed; inds - an integer vector of the edge indices of any loop or duplicate edges in the original network.

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 remove loops and duplicate edges. g <- swiss[,3:4] g.dup <- edge.duplicates(g)
  • Maintainer: Alex T. Kalinka
  • License: GPL (>= 2)
  • Last published: 2021-02-04