sg_make_nodes

0th

Percentile

Generate data

Generate nodes and edges.

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

sg_make_edges(nodes, n = nrow(nodes) * 1.5)

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

  • sg_make_nodes generate data.frame nodes.

  • sg_make_edges generate data.frame edges.

  • sg_make_nodes_edges generate list of nodes and edges.

Aliases
  • sg_make_nodes
  • sg_make_edges
  • sg_make_nodes_edges
Examples
# NOT RUN {
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")

# }
Documentation reproduced from package sigmajs, version 0.1.3, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.