Description Usage Arguments Value Examples
View source: R/temporal_nets.R
Filter edgelist for a time slice
1 2 3 4 5 6 7 8 9 |
edge.list |
the edgelist from which to compute the time slices |
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 ' |
start_time |
the timestamp a which start the timewindow slice. It can be an integer defining either the index of the start point or the unit of time at which to cut, or a datestring string. |
end_time |
(optional) the timestamp a which to end the timewindow slice. It can be an integer defining either the index of the end point or the unit of time at which to cut, or a datestring string. |
duration |
(optional) the duration of the timewindow. If 'end_time' is not provided it defines how long after 'start_time' the window should be cut. |
index |
boolean, set to TRUE if start_time and end_time are supplied as indices. Defaults to FALSE. |
as_date |
(optional) boolean, are the timestamps supplied as datestrings? |
a tibble with the edgelist cut such that timestamps are between 'start_time' and 'end_time'
1 2 3 4 | el <- data.frame(from= c('a','b','b','c','d','d'),
to = c('b','c','d','a','b','a'),
t = 1:6 )
slice <- get_slice_edgelist(el, select_cols = 1:3, start_time = 2, duration = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.