Remove loop and/or multiple edges from a graph
simplify removes the multiple and/or loop edges from
simplify(graph, remove.multiple = TRUE, remove.loops = TRUE)
- The graph to work on.
- Logical, whether the loop edges are to be removed.
- Logical, whether the multiple edges are to be removed.
remove.multiple are TRUE
the function returns a simple graph.
- A new graph object with the edges deleted.
g <- graph( c(1,2,1,2,3,3) ) simplify(g, remove.loops=FALSE) simplify(g, remove.multiple=FALSE)
Looks like there are no examples yet.