as.data.frame.dynet_projection: Tidy tables from a time-projected network

View source: R/projection.R

as.data.frame.dynet_projectionR Documentation

Tidy tables from a time-projected network

Description

Tidy tables from a time-projected network

Usage

## S3 method for class 'dynet_projection'
as.data.frame(
  x,
  row.names = NULL,
  optional = FALSE,
  what = c("vertices", "edges"),
  ...
)

Arguments

x

A projection returned by projection().

row.names

Ignored; present for compatibility with the generic.

optional

Ignored; present for compatibility with the generic.

what

"vertices", the default, returns vertex-time states, and "edges" returns directed within-slice and identity arcs.

...

Ignored.

Value

A plain data frame. Vertex rows contain state, optional session and observation, slice, time, start, end, closed, node, active, and copied node attributes. Edge rows contain from_state, to_state, from_node, to_node, optional session, from_slice, to_slice, from_time, to_time, edge_type, weight, n_spells, and lag.

Examples

dn <- dynet(school_contacts)
projected <- projection(dn, step = 4, window = 4)
as.data.frame(projected)
as.data.frame(projected, what = "edges")

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