Description Usage Arguments Details Value See Also Examples
Generate random groups of node/edge in a network or in a set of networks.
1 | generateGroups(networks, numGroups, nodeSize = 1, edgeSize = 0, newEdges = FALSE)
|
networks |
A network or a set of networks contain the generated groups |
numGroups |
Number of random groups to be generated for each network. If set to "all", all possible groups would be generated. |
nodeSize |
Number of nodes in each group, default is 1 |
edgeSize |
Number of edges in each group, default is 0 |
newEdges |
If TRUE, new edges would be created for each group. Otherwise, existing edges of the networks are selected for each group. |
This function generates random groups of elements in a network or in a set of networks. The groups would be used to analyze the dynamics of the examined networks, for ex., calculating sensitivity, perturbing a network, or restoring a network to the origin. Each element group contains only nodes, only edges, or a combination of nodes/edges.
The updated network objects including generated groups
calSensitivity
, perturb
, restore
1 2 3 4 5 6 7 8 9 10 11 12 | data(amrn)
# Generate all possible groups each containing a single node in the AMRN network
amrn <- generateGroups(amrn, "all", 1, 0)
print(amrn$Group_1)
# Generate all possible groups each containing a single edge in the AMRN network
amrn <- generateGroups(amrn, "all", 0, 1)
print(amrn$Group_2)
# Generate all possible groups each containing a new edge (the edge did not exist in the AMRN network)
amrn <- generateGroups(amrn, "all", 0, 1, TRUE)
print(amrn$Group_3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.