Learn R Programming

SNscan (version 1.0)

graph.rmedge: Random Graph with Expected Edges

Description

Generate random graph with expected edges.

Usage

graph.rmedge(n, g, fix.edge = TRUE)

Arguments

n
Integer value, the number of random graph.
g
An igraph object, a baseline graph for generating random graph.
fix.edge
When fix.edge = TRUE, the number of edges is fixed and equal to the number of edges in the original graph g. When fix.edge = FALSE, the number of edges is randomly generated according to the connection probability of the original graph g.

Value

A data list in which each component is an igraph object.

See Also

erdos.renyi.game

Examples

Run this code
library(igraph)
g = graph.ring(10)
graph.rmedge(n=1,g=g,fix.edge = TRUE)
graph.rmedge(n=1,g=g,fix.edge = FALSE)

Run the code above in your browser using DataLab