Creates a random two-mode network

create_random(node1, node2, density)

Arguments

node1

Number of nodes in the first node set

node2

Number of nodes in the second node set

density

Number of edges in the network over the number of edges possible

Details

Will construct an affiliation matrix, with a random probability of a tie.

Examples

create_random(10, 12, 0.25)
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] #> [1,] 0 1 0 0 0 0 1 0 0 1 1 0 #> [2,] 1 0 0 0 0 0 0 0 0 0 1 1 #> [3,] 0 0 0 0 0 0 0 0 0 0 0 0 #> [4,] 0 0 0 0 0 0 0 0 0 1 0 1 #> [5,] 0 0 1 0 0 0 0 0 0 0 0 1 #> [6,] 0 0 0 0 1 1 0 0 1 0 0 0 #> [7,] 0 0 0 0 1 0 1 0 0 0 0 0 #> [8,] 0 0 0 1 1 0 0 0 0 1 0 1 #> [9,] 0 0 0 0 1 0 0 1 0 0 0 0 #> [10,] 1 1 0 0 0 0 0 0 0 0 1 0