
A graph with random subgraphs connected by negative edges
Source:R/random_graphs.R
sample_islands_signed.Rd
Create a number of Erdos-Renyi random graphs with identical parameters, and connect them with the specified number of negative ties.
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.
Examples
library(igraph)
sample_islands_signed(3, 10, 0.5, 1)
#> IGRAPH 552ba11 U--- 30 67 --
#> + attr: grp (v/c), sign (e/n)
#> + edges from 552ba11:
#> [1] 1-- 2 1-- 3 1-- 4 1-- 6 1-- 7 1-- 8 1-- 9 1--10 2-- 5 2-- 6
#> [11] 2-- 8 2--10 3-- 4 3-- 7 3-- 8 4-- 5 4-- 7 4--10 5-- 7 5-- 8
#> [21] 5-- 9 6-- 7 7-- 9 7--10 8-- 9 11--14 11--18 11--20 12--13 12--15
#> [31] 12--18 12--19 12--20 13--14 13--15 13--18 14--15 14--17 14--20 15--17
#> [41] 15--18 15--19 15--20 16--17 16--18 16--20 19--20 21--22 21--28 21--30
#> [51] 22--24 22--25 22--26 22--27 23--24 23--25 23--26 23--27 23--29 23--30
#> [61] 24--27 24--28 26--28 28--29 8--28 14--29 5--24