Learn R Programming

brainGraph (version 0.72.0)

sim.rand.graph.par: Simulate N random graphs w/ same clustering and degree sequence as the input.

Description

This function will simulate N simple random graphs with the same clustering and degree sequence as the input. Essentially a wrapper for sim.rand.graph.clust and set.brainGraph.attributes. It uses foreach to speed it up. If you do not want to match by clustering, then it will do a simple rewiring of the given graph (the number of rewire's equaling the larger of 1e4 and 10 * number of edges).

Usage

sim.rand.graph.par(g, N, clustering = TRUE, ...)

Arguments

g
A graph with the characteristics for simulation of random graphs
N
The number of iterations
clustering
Logical for whether or not to control for clustering
...
Other parameters (passed to sim.rand.graph.clust)

Value

A list of N random graphs with vertex and graph attributes.

See Also

sim.rand.graph.clust, rewire

Examples

Run this code
## Not run: 
# rand1 <- sim.rand.graph.par(g1[[N]], N=1e3, clustering=F)
# rand1.cl <- sim.rand.graph.par(g1[[N]], N=1e2, max.iters=1e3)
# ## End(Not run)

Run the code above in your browser using DataLab