| snapshots | R Documentation |
The edges alive in each time bin, as one tidy table. Useful for exporting a slice, for feeding a layout routine, or for checking by eye what the metric verbs are seeing.
snapshots(
dn,
at = NULL,
sessions = c("bounded", "collapse", "separate"),
sample = NULL,
start = NULL,
end = NULL,
step = NULL,
window = NULL,
plot = FALSE
)
dn |
A temporal network from |
at |
Optional single time, narrowing the result to the bins that
cover it. A network built from dates may be addressed with a date.
With the default disjoint tiling that is one bin; with an
overlapping |
sessions |
How to treat sessions, as in |
sample |
Deprecated. |
start, end |
First and last time at which to measure. Default to the observed range. A network built from dates may be addressed with dates. |
step |
How often to measure. Defaults to the interval the network was built with. |
window |
How much time each measurement covers. Defaults to |
plot |
Whether to draw the result as well as return it. Drawing is a
side effect in the manner of |
A dynet_snapshot data frame with one row per active edge per bin:
session (when the network has sessions), observation (when
observation is discontinuous, naming the observed component the bin falls
in), time, from, to, weight and n_spells.
print() shows a header and the first rows, summary() collapses to one
row per bin, plot() draws how many ties each bin holds, and
as.data.frame() returns the plain table. A pair
joined by more than one spell in the same bin is one edge, with
n_spells recording how many spells were collapsed – so the edge counts
here agree with those from metrics(). weight is the sum of those
spells' full weights: a spell counts its whole weight in every bin it
touches, as networkDynamic::network.collapse() does. Snapshot
"strength" in centrality_series() instead splits a spell's weight by
the share of its duration inside the bin. Eligible isolates have no
synthetic edge row; use centrality_series() or metrics() when the
eligible population itself is required.
Errors: dynet_no_sessions (sessions = "separate" without a session
column), dynet_outside_observation (the requested range misses observed
support; it also carries dynet_bad_input), and dynet_bad_input for
every other broken contract – dn not
a dynet, an at, start or end that is not a single finite time, and
an out-of-range step or window.
Warning: dynet_deprecated for the retired sample argument.
dn <- dynet(school_contacts)
snapshots(dn, at = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.