as.data.frame.dynet_pathways: Tidy data frame of ranked pathways

View source: R/pathways.R

as.data.frame.dynet_pathwaysR Documentation

Tidy data frame of ranked pathways

Description

Tidy data frame of ranked pathways

Usage

## S3 method for class 'dynet_pathways'
as.data.frame(
  x,
  row.names = NULL,
  optional = FALSE,
  what = c("routes", "steps"),
  ...
)

Arguments

x

A dynet_pathways result.

row.names

Ignored; present for compatibility with the generic.

optional

Ignored; present for compatibility with the generic.

what

"routes", the default, gives one row per distinct route. "steps" gives one row per vertex visited – route, step, vertex and the time the route reaches it, preceded by from when pooled – which is the per-hop timing the plot draws and the shape to use for any waiting-time analysis of your own.

...

Ignored.

Value

A plain data.frame with the columns described in pathways(), most frequent first, or the per-step table when what = "steps".

Examples

dn <- dynet(school_contacts)
routes <- pathways(dn, from = "Ana")
as.data.frame(routes)
as.data.frame(routes, what = "steps")

Dynet documentation built on Oct. 7, 2026, 5:08 p.m.