plot.critical_links: Plot a Critical-Edge Analysis

View source: R/critical_links.R

plot.critical_linksR Documentation

Description

Method interface to plot_critical_edges: draws the weighted central graph of each population alongside a panel highlighting the critical edges.

Usage

## S3 method for class 'critical_links'
plot(x, populations, ...)

Arguments

x

An object of class "critical_links".

populations

The named list of populations that was passed to identify_critical_links.

...

Further arguments passed to plot_critical_edges, such as communities, layout or reference.

Details

The populations must be supplied, because the object stores the modified populations, in which the critical edges have been removed, and plotting them would hide the very structure the figure is about.

Value

Invisibly NULL; called for its side effect.

See Also

plot_critical_edges, which this method wraps and which can also be called directly.

Examples


set.seed(1)
community_sizes <- c(4, 3, 3)
control <- generate_category_graphs(n_graphs = 30, n_nodes = 10,
  n_communities = 3, community_sizes = community_sizes,
  base_intra_prob = rep(0.8, 3), base_inter_prob = 0.1, seed = 1)
patient <- generate_category_graphs(n_graphs = 30, n_nodes = 10,
  n_communities = 3, community_sizes = community_sizes,
  base_intra_prob = c(0.3, 0.8, 0.8), base_inter_prob = 0.1, seed = 2)
populations <- list(Control = control, Patient = patient)
result <- identify_critical_links(populations, n_permutations = 200,
  seed = 42)
plot(result, populations,
  communities = rep(seq_along(community_sizes), times = community_sizes))


BrainNetTest documentation built on Dec. 3, 2026, 5:08 p.m.