random_graph: Create random graphs using my preferred models

Description Usage Arguments Value Examples

Description

These are light-weight wrappers around 'tidygraph' functions to create random graphs. They return graphs with named nodes.

Usage

1
2
3
4
5
quick_forestfire(n, name = c(), directed = FALSE)

quick_barabasi(n, name = c(), directed = FALSE)

quick_graph(n, name = c(), directed = FALSE)

Arguments

n

number of nodes

name

node names; default is LETTERS

directed

boolean value for directed or undirected graph

Value

a tridygraph object with named nodes

Examples

1
2
3
4
5
6
7
8
9
set.seed(0)

forest_gr <- quick_forestfire(20)
forest_gr
plot(forest_gr)

barabasi_gr <- quick_barabasi(20)
barabasi_gr
plot(barabasi_gr)

jhrcook/jhcutils documentation built on Sept. 2, 2020, 7:16 a.m.