generatetonetwork {timeordered} | R Documentation |
Generates a time-ordered network from an interaction list.
Description
Constructs a directed network describing the causally permitted paths between a set of vertices that interact at known times.
Usage
generatetonetwork(raw, allindivs)
Arguments
raw |
An event list, consisting of a data frame with four columns: VertexFrom, VertexTo, TimeStart, and TimeStop. Each row in this data frame represents a single directed interaction event between VertexFrom and VertexTo beginning at TimeStart and ending at TimeStop. |
allindivs |
A list of all possible vertices potentially including ones not observed interacting during the range of time reported in |
Value
A weighted directed network of class 'igraph'. Each vertex represents an individual at a time during which an interaction occurred. Edges represent causally permitted paths of resource flow and have a TimeCost, describing the time between interactions for an individual, or is 0 if the edge represents an interaction, and a HopCost, which is 0 if the edge connects the same individual at multiple times and 1 if it connects different individuals at the same time.
Author(s)
Benjamin Blonder bblonder@email.arizona.edu.
References
Kostakos V. Temporal Graphs. arXiv (2008) vol. physics.soc-ph
Examples
data(ants)
allindivs <- c(union(ants$VertexFrom, ants$VertexTo), "NULL1", "NULL2")
g <- generatetonetwork(ants, allindivs)
plottonet(g)