tnet-package: Collection of functions for analysing weighted networks,...

Description Details Author(s) References Examples

Description

This package is created to analyse weighted networks, two-mode networks, and longitudinal networks datasets. Binary ties limit the richness of network analyses as relations are unique. The two-mode structure contains a number of features lost when projection it to a one-mode network. Longitudinal datasets allow for an understanding of the causal relationship among ties, which is not the case in cross-sectional datasets as ties are dependent upon each other.

Details

Package: tnet
Type: Package
Version: 3.0.16
Date: 2020-02-23

This package is created to analyse weighted networks, two-mode networks, and longitudinal networks datasets. More information is available on http://toreopsahl.com/tnet/

It utilises three forms of data structures (it can automatically convert matrices etc into these formats, see the as.tnet-function):

1) simple weighted data in the following format (creator.node.id target.node.id tie.weight):
1 2 4
1 3 2
Note: For undirected networks, each tie must be mentioned twice (see the symmetrise_w-function). For example,
1 2 4
2 1 4
1 3 2
3 1 2

2) two-mode data in the following format (primary.node.id secondar.node.id tie.weight.optional):
1 1 1
2 1 2

3) timed data in the following format (MySQL-timestamp.as.character.string creator.node.id target.node.id tie.weight):
"2007-09-12 13:45:00" 1 2 1
"2007-09-12 13:46:31" 1 2 1
If ties are repeated, the tie increases the weighted. The weight column decides how much weight is added at each time (this can take a negative value to decrease the weight).

Attribute files are read as follows:
0 1 3
0 3 2
1 3 3
where the first row refers to node 1, the second row to node 2, etc. The first column refers to the first attribute, second column to the second attribute and so on.

A big thank you to the igraph guys as this package relies on their work for many of the more computational tasks!

Author(s)

Tore Opsahl; http://toreopsahl.com

References

http://toreopsahl.com/tnet/

Examples

1
2
3
4
5
# Generate a random weighted graph
rg <- rg_w(nodes=100,arcs=300,directed=TRUE)

# Calculate clustering coefficient
clustering_w(rg)

Example output

Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

Loading required package: survival
tnet: Analysis of Weighted, Two-mode, and Longitudinal networks.
Type ?tnet for help.
        am 
0.03225806 

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