powered by
Simulate a network of a stochastic block model
rsbm(n, theta, directed = TRUE)
list with simulated adjacency matrix ($adj) and node labels ($Z)
number of vertices
stochastic block model parameter with latent group probabilities $pi and connectivy parameters $gamma
directed network (TRUE by default) or undirected (FALSE)
theta1 <- list(pi=c(.5,.5), gamma=matrix((1:4)/8,2,2)) rsbm(10, theta1)
Run the code above in your browser using DataLab