Skip to contents

Generates custom mock data to be passed to gglyph::geom_glyph().

Usage

generate_mock_data(
  n_nodes = 5,
  n_edges = 7,
  n_groups = 1,
  statistical = FALSE,
  p_threshold = 0.05
)

Arguments

n_nodes

Number of nodes in the graph. Default is 5.

n_edges

Number of edges to generate. Default is 7.

n_groups

Number of groups (for faceting). Default is 1 (ungrouped).

statistical

If TRUE, generates mock p-values for edges. Default is FALSE.

p_threshold

The significance threshold for filtering edges. Default is 0.05.

Value

A data frame with mock data for nodes and edges.

Examples

# For non-grouped data
mock_data <- generate_mock_data(
  n_nodes = 5,
  n_edges = 7,
  n_groups = 1,
  statistical = FALSE,
  p_threshold = 0.05
)

# For grouped data
mock_data <- generate_mock_data(
  n_nodes = 5,
  n_edges = 7,
  n_groups = 3,
  statistical = TRUE,
  p_threshold = 0.05
)