Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

graph_attr-set

Set all or some graph attributes


Description

Set all or some graph attributes

Usage

graph_attr(graph, name) <- value

Arguments

graph

The graph.

name

The name of the attribute to set. If missing, then value should be a named list, and all list members are set as attributes.

value

The value of the attribute to set

Value

The graph, with the attribute(s) added.

See Also

Examples

g <- make_graph(~ A - B:C:D)
graph_attr(g, "name") <- "4-star"
g

graph_attr(g) <- list(layout = layout_with_fr(g),
                       name = "4-star layed out")
plot(g)

igraph

Network Analysis and Visualization

v1.2.10
GPL (>= 2)
Authors
See AUTHORS file.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.