powered by
stubs.sampling(s, g)
graph
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