This extract the adjacency matrix from an igraph object and generates a randomized version of the network with the same row and column totals, the results have the same in and out degree sequence than the original network. The diagonals are not avoided so it can generate self-links or cannibalism in the context of food-webs. In the case that the network has multiple components (or disconnected networks) the algorithm simulates around the same number of components, if the original network has 1 component the algorithm enforces that the results have all 1 component.
curve_ball(g, nsim = 1000)
igraph object to extract adjacency matrix
number of generated random networks
a list of randomized igraph objects
Strona, G. et al. 2014. A fast and unbiased procedure to randomize ecological binary matrices with fixed row and column totals. -Nat. Comm. 5: 4114. doi: 10.1038/ncomms5114
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.