Learn R Programming

SNscan (version 1.0)

stubs.sampling: Generate Random Graph

Description

Generate random graph by randomly permuting the stubs of nodes

Usage

stubs.sampling(s, g)

Arguments

s
Number of samplings.
g
An igraph object, a baseline graph for generating random graph.

Value

A data matrix in which each row is the edge expression of graph.

See Also

graph

Examples

Run this code
library(igraph)
par(mfrow=c(2,1))
g <- graph.ring(10);plot(g)
Sg=stubs.sampling(s=10, g=g)
sg=graph(Sg[1,],n=V(g),directed=FALSE);plot(sg)

Run the code above in your browser using DataLab