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

layout_tbl_graph_eigen

Place nodes according to their eigenvalues


Description

This layout is based on the idea of spectral layouts where node coordinates are calculated directly by decomposing a matrix representation of the graph and extracting the eigenvectors.

Usage

layout_tbl_graph_eigen(
  graph,
  type = "laplacian",
  eigenvector = "smallest",
  circular = FALSE
)

Arguments

graph

A tbl_graph object

type

The type of matrix to extract the eigenvectors from. Either 'laplacian' or 'adjacency'

eigenvector

The eigenvector to use for coordinates. Either 'smallest' or 'largest'

circular

ignored

Value

A data.frame with the columns x, y, circular as well as any information stored as node variables in the tbl_graph object.

Author(s)

The underlying algorithm is implemented in the graphlayouts package by David Schoch

See Also


ggraph

An Implementation of Grammar of Graphics for Graphs and Networks

v2.0.5
MIT + file LICENSE
Authors
Thomas Lin Pedersen [cre, aut] (<https://orcid.org/0000-0002-5147-4711>), RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.