Remove all isolates from the graph

remove_isolates(x, loops = FALSE)

Arguments

x

graph of class igraph or network

loops

should self-loops count when deciding if a vertex is an isolate? See extract_isolates for details.

Value

graph with the isolates (if any) removed

Details

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.

See also

Finding isolates: extract_isolates