| as.data.frame.dynet_paths | R Documentation |
Tidy data frame of time-respecting paths
## S3 method for class 'dynet_paths'
as.data.frame(
x,
row.names = NULL,
optional = FALSE,
what = c("paths", "steps"),
...
)
x |
A |
row.names |
Ignored; present for compatibility with the generic. |
optional |
Ignored; present for compatibility with the generic. |
what |
|
... |
Ignored. |
A plain data.frame. For "paths", one row per endpoint vertex,
the source included, with the columns paths() documents: node,
reachable, arrival_time, attained, latency, n_hops and
n_paths, plus path_session and n_best_sessions under
sessions = "bounded", and session and origin under
sessions = "separate". For "steps", one row per step of every
reconstructed optimal route, with endpoint (the vertex the route ends
at), path_id (which of the tied optimal routes to that endpoint),
path_session, step (position along the route, starting at the
source), node (the vertex occupied at that step), time (when it was
reached) and attained.
dn <- dynet(school_contacts)
reach <- paths(dn, from = "Ana")
as.data.frame(reach)
as.data.frame(reach, what = "steps")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.