Skip to contents

Create a number of Erdos-Renyi random graphs with identical parameters, and connect them with the specified number of negative ties.

Usage

sample_islands_signed(islands.n, islands.size, islands.pin, n.inter)

Arguments

islands.n

The number of islands in the graph.

islands.size

The size of the islands in the graph.

islands.pin

The probability of intra-island edges.

n.inter

number of negative edges between two islands.

Value

a signed igraph graph

Author

David Schoch

Examples

library(igraph)
sample_islands_signed(3, 10, 0.5, 1)
#> IGRAPH 416d9d5 U--- 30 75 -- 
#> + attr: grp (v/c), sign (e/n)
#> + edges from 416d9d5:
#>  [1]  1-- 3  1-- 4  1-- 5  1-- 7  2-- 3  2-- 5  2-- 6  2-- 8  2-- 9  2--10
#> [11]  3-- 4  3-- 8  3-- 9  3--10  4-- 6  4-- 7  5-- 6  5-- 8  6-- 7  6-- 8
#> [21]  6-- 9  7-- 8  7--10  9--10 11--12 11--16 11--17 11--20 12--13 12--16
#> [31] 12--17 12--18 12--19 12--20 13--15 13--16 13--17 13--18 14--17 14--19
#> [41] 15--16 15--18 15--20 16--17 16--18 16--20 17--18 17--19 19--20 21--23
#> [51] 21--24 21--26 21--28 21--30 22--25 22--26 22--28 22--30 23--25 23--26
#> [61] 23--30 24--25 24--26 24--28 24--30 25--27 25--29 25--30 26--29 26--30
#> [71] 27--30 28--29  7--28  8--11 16--22