rg_reshuffling_w: Reshuffle of a weighted network

Description Usage Arguments Value Note Author(s) References Examples

Description

This function randomly resuffles a weighted edgelist.

Usage

1
 rg_reshuffling_w(net, option="weights", directed=NULL, seed=NULL) 

Arguments

net

A weighted edgelist

option

what should be reshuffled: 1) weights (default): randomly assigns the weights to the edges; 2) links: maintain the degree distribution, but changes the contacts randomly.

directed

logical: is the network directed or undirected. Default: NULL

seed

seed for random generator, set if you want random yet reproducable results.

Value

Returns a randomised (reshuffled) network.

Note

version 1.0.0

Author(s)

Tore Opsahl; http://toreopsahl.com

References

Molloy, M., Reed, B., 1995. A critical point for random graphs with a given degree sequence. Random Structures and Algorithms 6, 161-180.
Opsahl, T., Colizza, V., Panzarasa, P., Ramasco, J. J., 2008. Prominence and control: The weighted rich-club effect. Physical Review Letters 101 (168702). arXiv:0804.0417.
http://toreopsahl.com/2008/12/12/article-prominence-and-control-the-weighted-rich-club-effect/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Load sample data
sampledata<-rbind(
c(1,2,4),
c(1,3,2),
c(2,1,4),
c(2,3,4),
c(2,4,1),
c(2,5,2),
c(3,1,2),
c(3,2,4),
c(4,2,1),
c(5,2,2),
c(5,6,1),
c(6,5,1));

## Run the function
rg_reshuffling_w(sampledata, option="weights", directed=FALSE)

tnet documentation built on Feb. 25, 2020, 1:07 a.m.