preference.game | R Documentation |
preference.game()
was renamed to sample_pref()
to create a more
consistent API.
preference.game(
nodes,
types,
type.dist = rep(1, types),
fixed.sizes = FALSE,
pref.matrix = matrix(1, types, types),
directed = FALSE,
loops = FALSE
)
nodes |
The number of vertices in the graphs. |
types |
The number of different vertex types. |
type.dist |
The distribution of the vertex types, a numeric vector of length ‘types’ containing non-negative numbers. The vector will be normed to obtain probabilities. |
fixed.sizes |
Fix the number of vertices with a given vertex type
label. The |
pref.matrix |
A square matrix giving the preferences of the vertex types. The matrix has ‘types’ rows and columns. When generating an undirected graph, it must be symmetric. |
directed |
Logical constant, whether to create a directed graph. |
loops |
Logical constant, whether self-loops are allowed in the graph. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.