rg_reshuffling_l: Reshuffling a longitudinal network

Description Usage Arguments Value Note Author(s) References Examples

Description

This function reshuffles a longitudinal dataset.

Usage

1
rg_reshuffling_l(net, keep.i = FALSE, keep.j = FALSE, seed = NULL)

Arguments

net

Longitudinal network

keep.i

Whether or not the tie creators should be maintained

keep.j

Whether or not the tie receivers should be maintained

seed

the random seed. If you want it to have reproducable result, set using an integer

Value

Returns a reshuffled longitudinal network

Note

version 1.0.0

Author(s)

Tore Opsahl; http://toreopsahl.com

References

tore@opsahl.co.uk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
t <- c('2007-09-12 13:45:00', 
'2007-09-12 13:46:31',
'2007-09-12 13:47:54',
'2007-09-12 13:48:21',
'2007-09-12 13:49:27',
'2007-09-12 13:58:14',
'2007-09-12 13:52:17',
'2007-09-12 13:56:59');
i <- c(1,1,1,1,1,1,1,1);
j <- c(2,2,2,2,2,2,3,3);
w <- c(1,1,1,1,1,1,1,1);
sample <- data.frame(t, i, j, w);

rg_reshuffling_l(sample)

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.
                     t i j w
1  2007-09-12 13:45:00 1 1 1
2  2007-09-12 13:45:00 2 2 1
3  2007-09-12 13:45:00 2 1 1
4  2007-09-12 13:46:31 2 1 1
5  2007-09-12 13:47:54 2 1 1
6  2007-09-12 13:48:21 2 1 1
7  2007-09-12 13:49:27 1 2 1
8  2007-09-12 13:52:17 3 3 1
9  2007-09-12 13:52:17 1 2 1
10 2007-09-12 13:56:59 2 1 1
11 2007-09-12 13:58:14 2 3 1
Warning message:
In as.tnet(net, type = "longitudinal tnet") : Adding node joining data

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