shuffle_graph_ids | R Documentation |
Randomly shuffles the IDs of the nodes in a given graph and optionally plots the shuffled graph.
shuffle_graph_ids(g, plot = FALSE)
g |
An igraph object representing the graph. |
plot |
Logical. If |
An igraph object with shuffled node IDs.
# Create an example graph
g <- make_tree(n_cases = 10, R = 2)
# Shuffle the node IDs
shuffled_graph <- shuffle_graph_ids(g, plot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.