delete_edges | R Documentation |
Delete edges from a graph
delete_edges(graph, edges)
graph |
The input graph. |
edges |
The edges to remove, specified as an edge sequence. Typically
this is either a numeric vector containing edge IDs, or a character vector
containing the IDs or names of the source and target vertices, separated by
|
The graph, with the edges removed.
Other functions for manipulating graph structure:
+.igraph()
,
add_edges()
,
add_vertices()
,
complementer()
,
compose()
,
connect()
,
contract()
,
delete_vertices()
,
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) %>%
delete_edges(seq(1, 9, by = 2))
g
g <- make_ring(10) %>%
delete_edges("10|1")
g
g <- make_ring(5)
g <- delete_edges(g, get_edge_ids(g, c(1, 5, 4, 5)))
g
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.