| as_cumulative_edgelist | R Documentation |
Converts an object that carries timed-edge information into a
cumulative_edgelist: a data.frame with head, tail, start, stop
columns matching the format used elsewhere in EpiModel. The typical use
is feeding a networkDynamic object (from a non-tergmLite simulation,
an external source, or a post-hoc construction) into the reachability
tools.
as_cumulative_edgelist(x)
x |
An object to be converted to a cumulative edgelist. |
The networkDynamic method subtracts 1 from each spell's terminus so
that the resulting start/stop range is inclusive on both ends,
matching the convention used by get_cumulative_edgelist() and the
reachability functions.
A cumulative_edgelist object: a data.frame with at least the
columns head, tail, start, stop. Edges are active from time
start to time stop inclusive; NA in stop means the edge was
never observed to dissolve.
get_forward_reachable() / get_backward_reachable() for
typical downstream uses; dedup_cumulative_edgelist() when the source
contains overlapping spells for the same pair of nodes.
Other cumulative_edgelist:
dedup_cumulative_edgelist(),
get_cumulative_degree(),
get_cumulative_edgelist(),
get_cumulative_edgelists_df(),
get_partners(),
reachable-nodes,
update_cumulative_edgelist()
## Not run:
# Convert a saved networkDynamic from a non-tergmLite netsim run
nd <- get_network(sim, sim = 1, network = 1)
el_cuml <- as_cumulative_edgelist(nd)
fwd <- get_forward_reachable(el_cuml, from_step = 1, to_step = 100)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.