Remove all isolates from the graph
remove_isolates(x, loops = FALSE)
graph of class igraph
or network
should self-loops count when deciding if a vertex is an isolate?
See extract_isolates
for details.
graph with the isolates (if any) removed
Removes the isolates from an object of class igraph
or network
.
First, the algorithm identifies the isolates, using the extract_isolates
function. Then, the identified isolates are removed and the new, smaller,
graph is returned. Obviously, if x
does not contain any isolates,
x
will be returned unaltered.
Finding isolates: extract_isolates