create_graphs: Create different types of well-defined graphs

Description Usage Arguments Value Functions Examples

Description

These functions creates a long list of different types of well-defined graphs, that is, their structure is not based on any randomisation. All of these functions are shallow wrappers around a range of igraph::make_* functions but returns tbl_graph rather than igraph objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
create_ring(n, directed = FALSE, mutual = FALSE)

create_path(n, directed = FALSE, mutual = FALSE)

create_chordal_ring(n, w)

create_de_bruijn(alphabet_size, label_size)

create_empty(n, directed = FALSE)

create_bipartite(n1, n2, directed = FALSE, mode = "out")

create_citation(n)

create_complete(n)

create_notable(name)

create_kautz(alphabet_size, label_size)

create_lattice(dim, directed = FALSE, mutual = FALSE,
  circular = FALSE)

create_star(n, directed = FALSE, mutual = FALSE, mode = "out")

create_tree(n, children, directed = TRUE, mode = "out")

Arguments

n, n1, n2

The number of nodes in the graph

directed

Should the graph be directed

mutual

Should mutual edges be created in case of the graph being directed

w

A matrix specifying the additional edges in the chordan ring. See igraph::make_chordal_ring()

alphabet_size

The number of unique letters in the alphabet used for the graph

label_size

The number of characters in each node

mode

In case of a directed, non-mutual, graph should the edges flow 'out' or 'in'

name

The name of a notable graph. See a complete list in igraph::make_graph()

dim

The dimensions of the lattice

circular

Should each dimension in the lattice wrap around

children

The number of children each node has in the tree (if possible)

Value

A tbl_graph

Functions

Examples

1
2
# Create a complete graph with 10 nodes
create_complete(10)

tidygraph documentation built on May 2, 2019, 8:32 a.m.