Learn R Programming

simplegraph (version 1.0.1)

remove_multiple: Remove multiple edges from a graph

Description

Remove multiple edges from a graph

Usage

remove_multiple(graph)

Value

Graph, without the multiple edges. (More precisely, from each set of multiple edges, only one, the first one, is kept.)

Arguments

graph

Input graph.

See Also

Other multigraphs: is_loopy(), is_multigraph(), is_simple(), remove_loops(), simplify()

Examples

Run this code
G <- graph(list(A = c("A", "B", "B"), B = c("A", "C"), C = "A"))
is_multigraph(G)
is_multigraph(remove_multiple(G))

Run the code above in your browser using DataLab