shrink_to_weighted_network: Shrink a repetative edgelist into a weighted

Description Usage Arguments Value Note Author(s) References Examples

Description

This function creates a weighted edgelist from a list of edges where a duplicate means an increase in the weight.

Usage

1

Arguments

net

can use both undirected and directed edgelist in the following format (sender.id receiver.id):
1 2
1 2
1 2
1 2
1 3
1 3

Value

Returns a weighted one-mode network, e.g.,
1 2 4
1 3 2

Note

version 1.0.0

Author(s)

Tore Opsahl; http://toreopsahl.com

References

http://toreopsahl.com/2008/11/28/network-weighted-network/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## Load sample data
sample <- rbind(
c(1,2),
c(1,2),
c(1,2),
c(1,2),
c(1,3),
c(1,3),
c(2,1),
c(2,1),
c(2,1),
c(2,1),
c(2,3),
c(2,3),
c(2,3),
c(2,3),
c(2,4),
c(2,5),
c(2,5),
c(3,1),
c(3,1),
c(3,2),
c(3,2),
c(3,2),
c(3,2),
c(4,2),
c(5,2),
c(5,2),
c(5,6),
c(6,5))

## Run the programme
shrink_to_weighted_network(sample)

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