Constructor modifier to drop loop edges
See also
Constructor modifiers (and related functions):
make_(),
sample_(),
simplified(),
with_edge_(),
with_graph_(),
with_vertex_(),
without_attr(),
without_multiples()
Examples
# An artificial example
make_(full_graph(5, loops = TRUE))
#> ── <igraph> Full graph ────────────────────────────────────────────── eb737a8 ──
#> ℹ undirected
#> ℹ 5 vertices · 15 edges
#>
#> ── Attributes ──────────────────────────────────────────────────────────────────
#> → graph: name <chr>, loops <lgl>
#>
#> ── Edges ───────────────────────────────────────────────────────────────────────
#> [1] 1 ─ 1 1 ─ 2 1 ─ 3 1 ─ 4 1 ─ 5 2 ─ 2 2 ─ 3 2 ─ 4 2 ─ 5 3 ─ 3
#> [11] 3 ─ 4 3 ─ 5 4 ─ 4 4 ─ 5 5 ─ 5
make_(full_graph(5, loops = TRUE), without_loops())
#> ── <igraph> Full graph ────────────────────────────────────────────── c9805c0 ──
#> ℹ undirected
#> ℹ 5 vertices · 10 edges
#>
#> ── Attributes ──────────────────────────────────────────────────────────────────
#> → graph: name <chr>, loops <lgl>
#>
#> ── Edges ───────────────────────────────────────────────────────────────────────
#> [1] 1 ─ 2 1 ─ 3 1 ─ 4 1 ─ 5 2 ─ 3 2 ─ 4 2 ─ 5 3 ─ 4 3 ─ 5 4 ─ 5
