Description Usage Arguments Value Examples
View source: R/unfolded_temporal_nets.R
Generate the ggraph layout of a time unfolded graph
1 2 3 4 5 6 7 8 9 |
edge.list |
data.frame or tibble containing the edge list. It needs at least three column: the column with edge sources, the edge targets, and the timestamps of each edge. The order of columns should be 'timestamp', 'source', 'target'. If the edge.list columns come in different orders, use 'select_cols' to specify the right order. See the example for details. |
select_cols |
optional vector of 3 (2 for multi-graphs) elements
specifying which columns are the source,target, and attributes from which
building the graph. Otherwise Column 1 is assumed to be the source, column
2 the target, column 3 the attribute. In the case of multi-graphs, the
third element is not needed and the number of edges between each pair of
vertices is computed according to ' |
nodes |
optional vector containing all node names in case disconnected nodes should be included. |
vertical |
unfold vertically or horizontally? Defaults to FALSE (horizontal) |
resize_ratio |
ratio between horizontal and vertical dimensions of the grid layout. value < 1 gives a longer vertical side, >1 longer horizontal side. |
enlarge_ratio |
enlarge both y and x axis by this parameter. Defaults is 1. |
... |
extra parameters passed to internal methods |
ggraph layout object to plot the time unfolded network
1 2 3 4 5 6 | el <- data.frame(
from = c('A','B', 'A','B','B', 'A','C','C', 'A','B','C', 'D'),
to = c('C','C', 'C','C','D', 'C','D','E', 'C','C','E', 'E'),
ts = c( 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 6)
)
get_unfolded_adjacency(el, select_cols = 1:3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.