| as.data.frame.dynet_collapsed | R Documentation |
Tidy tables from a collapsed temporal network
## S3 method for class 'dynet_collapsed'
as.data.frame(
x,
row.names = NULL,
optional = FALSE,
what = c("edges", "nodes"),
...
)
x |
A network returned by |
row.names, optional |
Ignored; present for compatibility. |
what |
|
... |
Ignored. |
A plain data.frame. For "edges", one row per collapsed vertex
pair carrying every weighting side by side: from, to, binary,
union_duration, total_duration, duration_fraction, spell_count,
weight_sum, weighted_duration, latest_weight, first, last, and
the activity.duration and activity.count aliases. For "nodes", one
row per vertex with name, any static vertex attributes the network
carries, activity_duration and its activity.duration alias. See
collapse_network() for what each weighting means.
dn <- dynet(school_contacts)
collapsed <- collapse_network(dn)
as.data.frame(collapsed)
as.data.frame(collapsed, what = "nodes")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.