Learn R Programming

tnet (version 3.0.1)

longitudinal_data_to_edgelist: Transform longitudinal data format to edgelist format

Description

This programme transform a data in the lognitudinal format to the edgelist format

Usage

longitudinal_data_to_edgelist(ld)

Arguments

ld
Data in the longitudinal format

Value

  • Returns the data in a weighted edgelist format.

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);

## Run the programme
longitudinal_data_to_edgelist(sample)

Run the code above in your browser using DataLab