gtoy.rm {RedeR} | R Documentation |
A simple function to simulate random graphs with modular structures.
gtoy.rm(m=5, nmax=30, nmin=5, p1=0.5, p2=0.03, p3=0.7, gg=NULL, nn=vcount(gg), noise.range=c(0.2, 0.6), plot=FALSE, fname=NULL)
m |
Number of modules. |
nmax |
The maximum number of vertices in each module. |
nmin |
The minimum number of vertices in each module. |
p1 |
Probability for adding new vertices to a module. |
p2 |
Probability for drawing an edge between modules. |
p3 |
Probability for drawing an edge within modules. |
gg |
An igraph object generated by the 'gtoy.rm' function.
This option will add a random graph to the 'gg' object, following
Erdos-Renyi model (see |
nn |
When 'gg' is provided, this option defines the number of new vertices to add to the 'gg' object. |
noise.range |
When 'gg' is provided, this option sets the upper and lower
bounds of a uniform random distribution assigned to the random graph
by the |
plot |
A logical value. This option generates a boxplot for the simulated signal generated for each graph module. |
fname |
A string. The name of the pdf file in which the plot will be saved. |
Returns a igraph object.
Mauro Castro
#g<-gtoy.rm()