Description Usage Arguments Details Value

View source: R/stochastic_block_model.R

Draw a random graph from a stochastic blockmodel using a k-vector of block sizes and a k x k preference matrix

1 2 | ```
## S3 method for class 'sbm'
generate_graph(params)
``` |

`params` |
a list containing block.sizes, pref.matrix, and optionally block.names |

This routine is agnostic about the algorithm that was used to produce the preference matrix and the block sizes, so it could potentially be used with a lot of different models.

The `igraph`

object that gets returned is a graph drawn from
the stochastic block-model. The vertices each have a 'group' attribute
containing the name of the block they have been assigned to. These block
names default to 'group.1', 'group.2', ... if none are specified.

the `igraph`

object with each vertex's group membership
given by a vertex attribute

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.