View source: R/generate_random_graph.R
| generate_random_graph | R Documentation |
This function generates a random symmetric adjacency matrix representing a brain network. The adjacency matrix is binary, with edges present based on a specified probability.
generate_random_graph(n_nodes, edge_prob = 0.1)
n_nodes |
An integer specifying the number of nodes (brain regions). |
edge_prob |
A numeric value between 0 and 1 specifying the probability of an edge existing between any two nodes. |
A symmetric binary adjacency matrix with no self-loops.
G <- generate_random_graph(n_nodes = 10, edge_prob = 0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.