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

set_edge_attr

Set edge attributes


Description

Set edge attributes

Usage

set_edge_attr(graph, name, index = E(graph), value)

Arguments

graph

The graph

name

The name of the attribute to set.

index

An optional edge sequence to set the attributes of a subset of edges.

value

The new value of the attribute for all (or index) edges.

Value

The graph, with the edge attribute added or set.

See Also

Examples

g <- make_ring(10) %>%
  set_edge_attr("label", value = LETTERS[1:10])
g
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.