get_rolling_windows.Rd
Builds rolling multiedge time-window networks from the edge_list.
get_rolling_windows( edge.list, window_size, step_size = NULL, start_time = NULL, end_time = NULL, out_format = "edgelist", flush = "earliest", select_cols = NULL, as_date = NULL, ncores = NULL, ... ) # S3 method for tbl get_rolling_windows( edge.list, window_size, step_size = NULL, start_time = NULL, end_time = NULL, out_format = "edgelist", flush = "earliest", select_cols = NULL, as_date = NULL, ncores = NULL, nodes_tbl = NULL, ... ) # S3 method for tbl_graph get_rolling_windows( edge.list, window_size, step_size = NULL, start_time = NULL, end_time = NULL, out_format = "edgelist", flush = "earliest", select_cols = NULL, as_date = NULL, ncores = NULL, ... ) # S3 method for igraph get_rolling_windows( edge.list, window_size, step_size = NULL, start_time = NULL, end_time = NULL, out_format = "edgelist", flush = "earliest", select_cols = NULL, as_date = NULL, ncores = NULL, ... ) # S3 method for default get_rolling_windows( edge.list, window_size, step_size = NULL, start_time = NULL, end_time = NULL, out_format = "edgelist", flush = "earliest", select_cols = NULL, as_date = NULL, ncores = NULL, ... )
edge.list | A data-frame, tibble, with at least 3 columns: "source", "target", "timestamp", or a graph object that can be coerced to such table, where "from" and "to" are vertex identifiers, and "time" is a Unix-timestamp when the edge occurred. Alternatively, the user can select which column is which passing `select_cols` |
---|---|
window_size | The duration of each time-window network given as the number of seconds. |
step_size | The shift between consecutive time-window network given as the number of seconds. |
start_time | (optional) If given, the rolling time-windows are built starting at this timestamp. Else, they are started at min(edgelist$time). |
end_time | (optional) If given, rolling time-windows are created until they exceed this value. Else, this value defaults to max(edgelist$time). |
out_format | character vector specifying the format of the output: 'edgelist' for edgelists, 'adjacency' for adjacency matrices, 'tbl_graph' for `tbl_graph`s, 'igraph' for `igraph` graphs. Defaults to 'edgelist'. In the case of igraph and tbl_graph graphs, adding '_weighted' (as in 'igraph_weighted') allows to generate weighted graphs. |
flush | (optional) If "earliest" or unset, the first time-window starts at `start_time`, possibly excluding an incomplete time-window at `end_time`. If "latest", the last time-window ends at `end_time`, and possibly an incomplete time-window at start_time is discarded. |
select_cols | an (optional) vector specifying which columns to use. The first column should contain either the name or index for the sources of links, the second for the targets of links. The third entry should contain either the name or index for the timestamp column. When not passed, it will be assumed that the first three columns are `c(timestamp,source,target)`. If select_cols has a fourth entry, it will use this as edgeweight. |
as_date | (optional) boolean identifying if timestamps are in date formats, or unix seconds. |
ncores | integer, number of cores to use. Defaults to 1. |
... | additional parameters passed to internal constructors. E.g., to `get_adjacency`. |
nodes_tbl | (optional) tibble containing node attributes to be added to tbl_graph objects when tbl_graph output is chosen. The tibble should have a node_key column matching node names used in the edge.list. |
A tibble with two columns "network" and "time", where "network" is the time-window and "time" the corresponding time at which the time-window starts.
CZ, GC