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

make_ring

Create a ring graph


Description

A ring is a one-dimensional lattice and this function is a special case of make_lattice.

Usage

make_ring(n, directed = FALSE, mutual = FALSE, circular = TRUE)

ring(...)

Arguments

n

Number of vertices.

directed

Whether the graph is directed.

mutual

Whether directed edges are mutual. It is ignored in undirected graphs.

circular

Whether to create a circular ring. A non-circular ring is essentially a “line”: a tree where every non-leaf vertex has one child.

...

Passed to make_ring.

Value

An igraph graph.

See Also

Examples

print_all(make_ring(10))
print_all(make_ring(10, directed = TRUE, mutual = TRUE))

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.