Skip to contents

Construtor modifier to remove all attributes from a graph

Usage

without_attr()

See also

Examples

g1 <- make_ring(10)
g1
#> ── <igraph> Ring graph ────────────────────────────────────────────── 2a15ace ──
#>  undirected
#>  10 vertices · 10 edges
#> 
#> ── Attributes ──────────────────────────────────────────────────────────────────
#> → graph:  name <chr>, mutual <lgl>, circular <lgl>
#> 
#> ── Edges ───────────────────────────────────────────────────────────────────────
#>  [1] 1 ─ 2   2 ─ 3   3 ─ 4   4 ─ 5   5 ─ 6   6 ─ 7   7 ─ 8   8 ─ 9   9 ─ 10 
#> [10] 1 ─ 10 

g2 <- make_(ring(10), without_attr())
g2
#> ── <igraph> ───────────────────────────────────────────────────────── b938e7d ──
#>  undirected
#>  10 vertices · 10 edges
#> 
#> ── Edges ───────────────────────────────────────────────────────────────────────
#>  [1] 1 ─ 2   2 ─ 3   3 ─ 4   4 ─ 5   5 ─ 6   6 ─ 7   7 ─ 8   8 ─ 9   9 ─ 10 
#> [10] 1 ─ 10