network.form {networksis} | R Documentation |
network.form
generates a random bipartite graph with marginals given by user-specified row sums and column sums. These row sums and column sums must be consistent with each other (i.e. the sum of the row sums must be the same as the sum of the column sums).
network.form(row.sums, col.sums, nsim=1)
row.sums |
A vector of row sums. These row sums must be natural numbers. |
col.sums |
A vector of column sums. These column sums must be natural numbers. |
nsim |
Number of networks to be drawn from the set of all networks with the given marginals. |
A bipartite graph with specified row sums and column sums is randomly generated and returned.
network.form
bipartite network
object of the randomly generated bipartite graph.
row.sums <- c(3, 2, 0, 1) col.sums <- c(2, 2, 1, 1) bipartite.graph <- network.form(row.sums, col.sums)