Description Usage Arguments Value See Also Examples

Delete vertices from a graph

1 | ```
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()`

,
`delete_edges()`

,
`edge()`

,
`igraph-minus`

,
`path()`

,
`vertex()`

1 2 3 4 5 6 7 8 9 | ```
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)
``` |

```
Attaching package: 'igraph'
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
IGRAPH d0066c0 UN-- 10 10 -- Ring graph
+ attr: name (g/c), mutual (g/l), circular (g/l), name (v/c)
+ edges from d0066c0 (vertex names):
[1] A--B B--C C--D D--E E--F F--G G--H H--I I--J A--J
+ 10/10 vertices, named, from d0066c0:
[1] A B C D E F G H I J
IGRAPH 0800000 UN-- 7 5 -- Ring graph
+ attr: name (g/c), mutual (g/l), circular (g/l), name (v/c)
+ edges from 0800000 (vertex names):
[1] C--D F--G G--H H--I I--J
+ 7/7 vertices, named, from 0800000:
[1] C D F G H I J
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.