sg_make_nodes {sigmajs}R Documentation

Generate data

Description

Generate nodes and edges.

Usage

sg_make_nodes(
  n = 10,
  colors = c("#B1E2A3", "#98D3A5", "#328983", "#1C5C70", "#24C96B")
)

sg_make_edges(nodes, n = NULL)

sg_make_nodes_edges(n, ...)

Arguments

n

Number of nodes.

colors

Color palette to use.

nodes

Nodes, as generated by sg_make_nodes.

...

Any other argument to pass to sample_pa.

Value

tibble of nodes or edges or a list of the latter.

Functions

Examples

nodes <- sg_make_nodes()
edges <- sg_make_edges(nodes)

sigmajs() %>%
sg_nodes(nodes, id, label, size, color) %>%
sg_edges(edges, id, source, target) %>%
sg_settings(defaultNodeColor = "#0011ff")


[Package sigmajs version 0.1.5 Index]