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

igraph-dollar

Getting and setting graph attributes, shortcut


Description

The $ operator is a shortcut to get and and set graph attributes. It is shorter and just as readable as graph_attr and set_graph_attr.

Usage

## S3 method for class 'igraph'
x$name

## S3 replacement method for class 'igraph'
x$name <- value

Arguments

x

An igraph graph

name

Name of the attribute to get/set.

value

New value of the graph attribute.

See Also

Examples

g <- make_ring(10)
g$name
g$name <- "10-ring"
g$name

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.