View source: R/critical_links.R
| plot.critical_links | R Documentation |
Method interface to plot_critical_edges: draws the weighted
central graph of each population alongside a panel highlighting the
critical edges.
## S3 method for class 'critical_links'
plot(x, populations, ...)
x |
An object of class |
populations |
The named |
... |
Further arguments passed to |
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.
Invisibly NULL; called for its side effect.
plot_critical_edges, which this method wraps and
which can also be called directly.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.