delete_vertices | R Documentation |
Delete vertices from a graph
delete_vertices(graph, v)
graph |
The input graph. |
v |
The vertices to remove, a vertex sequence. |
The graph, with the vertices removed.
Other functions for manipulating graph structure:
+.igraph()
,
add_edges()
,
add_vertices()
,
complementer()
,
compose()
,
connect()
,
contract()
,
delete_edges()
,
difference()
,
difference.igraph()
,
disjoint_union()
,
edge()
,
igraph-minus
,
intersection()
,
intersection.igraph()
,
path()
,
permute()
,
rep.igraph()
,
reverse_edges()
,
simplify()
,
union()
,
union.igraph()
,
vertex()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.