removeSelfLoops
remove self loops in a graph
remove self loops in a graph
- Keywords
- models
Usage
removeSelfLoops(g)
Arguments
- g
- one instance of the
graph
class
Details
If a given graph contains self-loop(s), removeSelfLoops
removes them.
This is for those functions that cannot handle graphs with self-loops.
Value
-
A new graph without self loops.
Examples
con <- file(system.file("XML/dijkex.gxl",package="RBGL"))
g1 <- fromGXL(con)
close(con)
g2 <- ugraph(g1)
removeSelfLoops(g2)
Community examples
Looks like there are no examples yet.