gtoy.rm {RedeR} | R Documentation

## Random graphs and modules.

### Description

A simple function to simulate random graphs with modular structures.

### Usage

    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)

### Arguments

`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 `erdos.renyi.game`).
`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 `runif` function, which is applied with default settings.
`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.

### Value

Returns a igraph object.

### Author(s)

Mauro Castro

### Examples

    #g<-gtoy.rm()

[Package RedeR version 1.42.0 Index]