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

make_lattice

Create a lattice graph


Description

make_lattice is a flexible function, it can create lattices of arbitrary dimensions, periodic or aperiodic ones. It has two forms. In the first form you only supply dimvector, but not length and dim. In the second form you omit dimvector and supply length and dim.

Usage

make_lattice(
  dimvector = NULL,
  length = NULL,
  dim = NULL,
  nei = 1,
  directed = FALSE,
  mutual = FALSE,
  circular = FALSE
)

lattice(...)

Arguments

dimvector

A vector giving the size of the lattice in each dimension.

length

Integer constant, for regular lattices, the size of the lattice in each dimension.

dim

Integer constant, the dimension of the lattice.

nei

The distance within which (inclusive) the neighbors on the lattice will be connected. This parameter is not used right now.

directed

Whether to create a directed lattice.

mutual

Logical, if TRUE directed lattices will be mutually connected.

circular

Logical, if TRUE the lattice or ring will be circular.

...

Passed to make_lattice.

Value

An igraph graph.

See Also

Examples

make_lattice(c(5, 5, 5))
make_lattice(length = 5, dim = 3)

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.