Learn R Programming

tnet (version 3.0.1)

rg_l: Random longitudinal network generator

Description

This function creates a random network from a longitudinal dataset. NOTE NOTE THIS FILE IS STILL NOT DONE!!!

Usage

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

Arguments

net
Data in the longitudinal format
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 be non-reproducable, use NULL otherwise, use a number

Value

  • Returns a random longitudinal network.

References

tore@opsahl.co.uk

Examples

Run this code
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_l(sample)

Run the code above in your browser using DataLab