Skip to contents

Constructor modifier to add graph attributes

Usage

with_graph_(...)

Arguments

...

The attributes to add. They must be named.

See also

Other constructor modifiers: simplified(), with_edge_(), with_vertex_(), without_attr(), without_loops(), without_multiples()

Examples

make_(ring(10), with_graph_(name = "10-ring"))
#> IGRAPH dc8d554 U--- 10 10 -- 10-ring
#> + attr: name (g/c), mutual (g/l), circular (g/l)
#> + edges from dc8d554:
#>  [1] 1-- 2 2-- 3 3-- 4 4-- 5 5-- 6 6-- 7 7-- 8 8-- 9 9--10 1--10