Description Usage Arguments Value Examples
Creates an unweighted 'network' object containing randomly generated modules.
1 2 | random_network(p, n_modules = NULL, consistent_connections = FALSE,
...)
|
p |
The number of nodes in the network; 'p' is required to be between 10 and 20000. |
n_modules |
The number of modules to include in the network. If NULL, then modules are created until all nodes in the network have positive degree. |
consistent_connections |
If TRUE, then each module is modified so that, if two genes are connected in one module, then they are connected in every module. |
... |
Additional arguments passed to 'create_modules_for_network()', which uses 'sample_link_nodes_fn()', 'sample_module_nodes_fn()', and 'random_module()'. |
An unweighted network object.
1 2 3 4 5 6 7 | # Create a random network of 10 nodes
nw <- random_network(10)
nw
# Add a random weight to each connection.
nw <- gen_partial_correlations(nw)
# Plot the network
plot(nw)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.