| as.data.frame.dynet_metric | R Documentation |
Tidy data frame of a temporal measure
## S3 method for class 'dynet_metric'
as.data.frame(
x,
row.names = NULL,
optional = FALSE,
layout = c("long", "wide"),
what = c("values", "diagnostics"),
top = NULL,
...
)
x |
A |
row.names |
Ignored; present for compatibility with the generic. |
optional |
Ignored; present for compatibility with the generic. |
layout |
|
what |
|
top |
Keep only the |
... |
Ignored. |
A plain data.frame. Long layout carries measure and value
with one row per observation, alongside whichever columns say what was
measured: session when the network has sessions, time for anything
measured on a grid of bins, node for a vertex-level quantity, from
and to for a pair-level one, raw_spell for per-spell edge durations
and vertex_spell with implicit for per-spell vertex durations from
durations(), and from_group and to_group for mixing(). A
graph-level series carries time, measure and value alone.
Wide layout puts the identifying columns first and spreads what varies
across the rest. A measure taken on a grid of bins spreads time: one
column per bin, named t followed by the bin's time, leaving one row per
vertex and measure. A measure with no time axis, such as reachability,
spreads the measures instead: one column per measure, leaving one row per
vertex. A measure with no time axis and only one measure is already wide
and comes back unchanged.
dn <- dynet(school_contacts)
degree <- centrality_series(dn, measure = "degree")
as.data.frame(degree)
as.data.frame(degree, layout = "wide")
as.data.frame(degree, top = 5)
as.data.frame(degree, what = "diagnostics")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.