simplify {igraph} | R Documentation |
simplify
removes the multiple and/or loop edges from
a graph.
simplify(graph, remove.multiple = TRUE, remove.loops = TRUE)
graph |
The graph to work on. |
remove.loops |
Logical, whether the loop edges are to be removed. |
remove.multiple |
Logical, whether the multiple edges are to be removed. |
If both remove.loops
and remove.multiple
are TRUE
the function returns a simple graph.
A new graph object with the edges deleted.
Gabor Csardi csardi@rmki.kfki.hu
g <- graph( c(1,2,1,2,3,3) ) simplify(g, remove.loops=FALSE) simplify(g, remove.multiple=FALSE)