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

edge_attr

Query edge attributes of a graph


Description

Query edge attributes of a graph

Usage

edge_attr(graph, name, index = E(graph))

Arguments

graph

The graph

name

The name of the attribute to query. If missing, then all edge attributes are returned in a list.

index

An optional edge sequence, to query edge attributes for a subset of edges.

Value

The value of the edge attribute, or the list of all edge attributes if name is missing.

See Also

Examples

g <- make_ring(10) %>%
  set_edge_attr("weight", value = 1:10) %>%
  set_edge_attr("color", value = "red")
g
plot(g, edge.width = E(g)$weight)

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.