Remove specific vertices from the graph

remove_vertices(x, vertices)

Arguments

x

graph object of class network or igraph

vertices

vector with either vertex names or vertex id's.

Value

graph without the removed vertices

Details

Removes specific vertices from a graph (potentially bipartite) of class network or igraph.

The vertices to be removed can either be their id's or their names (if they exist in the graph object). The algorithm will first check if the vertices coincide with vertex names that are present in the object (if they exist) and, if they match, the vertices are removed according to their names. If they do not match, or if there are no vertex names in the graph object, vertices is assumed to refer to vertex id's.