delete_vertices: Delete vertices from a graph

View source: R/interface.R

delete_verticesR Documentation

Delete vertices from a graph

Description

Delete vertices from a graph

Usage

delete_vertices(graph, v)

Arguments

graph

The input graph.

v

The vertices to remove, a vertex sequence.

Value

The graph, with the vertices removed.

See Also

Other functions for manipulating graph structure: +.igraph(), add_edges(), add_vertices(), complementer(), compose(), connect(), contract(), delete_edges(), difference.igraph(), difference(), disjoint_union(), edge(), igraph-minus, intersection.igraph(), intersection(), path(), permute(), rep.igraph(), reverse_edges(), simplify(), union.igraph(), union(), vertex()

Examples

g <- make_ring(10) %>%
  set_vertex_attr("name", value = LETTERS[1:10])
g
V(g)

g2 <- delete_vertices(g, c(1, 5)) %>%
  delete_vertices("B")
g2
V(g2)

igraph documentation built on Aug. 10, 2023, 9:08 a.m.