Learn R Programming

metacoder (version 0.3.7)

layout_functions: Layout functions

Description

Functions used to determine graph layout. Calling the function with no parameters returns available function names. Calling the function with only the name of a function returns that function. Supplying a name and a graph object to run the layout function on the graph.

Usage

layout_functions(
  name = NULL,
  graph = NULL,
  intitial_coords = NULL,
  effort = 1,
  ...
)

Value

The name available functions, a layout functions, or a two-column matrix depending on how arguments are provided.

Arguments

name

(character of length 1 OR NULL) name of algorithm. Leave NULL to see all options.

graph

(igraph) The graph to generate the layout for.

intitial_coords

(matrix) Initial node layout to base new layout off of.

effort

(numeric of length 1) The amount of effort to put into layouts. Typically determines the the number of iterations.

...

(other arguments) Passed to igraph layout function used.

Examples

Run this code
# List available function names:
layout_functions()

# Execute layout function on graph:
layout_functions("davidson-harel", igraph::make_ring(5))

Run the code above in your browser using DataLab