| as.data.frame.dynet_path_network | R Documentation |
Tidy tables from a temporal path-union network
## S3 method for class 'dynet_path_network'
as.data.frame(
x,
row.names = NULL,
optional = FALSE,
what = c("edges", "nodes"),
...
)
x |
A network returned by |
row.names, optional |
Ignored. |
what |
|
... |
Ignored. |
A plain data.frame. For "edges", one row per hop used by an
optimal route, with from, to, weight, first_time, last_time and
n_endpoints. For "nodes", one row per reached vertex, with name,
arrival_time, latency, n_hops, n_paths and groups. See
path_network() for what each column means.
dn <- dynet(school_contacts)
routes <- paths(dn, from = "Ana")
union_network <- path_network(routes)
as.data.frame(union_network, what = "edges")
as.data.frame(union_network, what = "nodes")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.