temporal_network: Build time-windowed networks

View source: R/temporal-network.R

temporal_networkR Documentation

Build time-windowed networks

Description

Splits data by time windows and builds a separate network for each window using any network function.

Usage

temporal_network(
  data,
  network_fun,
  ...,
  window = 3,
  step = NULL,
  strategy = "fixed",
  time_col = "year"
)

Arguments

data

A data frame with a numeric time column.

network_fun

Function or character string naming a network function (e.g., author_network, "reference_network", conetwork).

...

Additional arguments passed to network_fun (e.g., type, counting, similarity, threshold, top_n).

window

Integer. Width of each time window in units of the time column (years, months, quarters, etc.). Default 3.

step

Integer or NULL. Step size between windows. Default NULL (equals window for fixed, 1 for sliding).

strategy

Character. Time window strategy:

"fixed"

Disjoint non-overlapping windows (default).

"sliding"

Overlapping windows advancing by step units.

"cumulative"

Each window starts at the earliest value and extends further.

time_col

Character. Name of the column containing the time variable. Default "year". Works with any numeric time unit: years, months, quarters, semesters, weeks, etc. (e.g., "month", "quarter", "time").

Value

A named list of data frames (edge lists). Names are window labels like "2018-2020".

Examples

data(biblio_data)

# Fixed 3-year windows
temporal_network(biblio_data, author_network, "collaboration")

# Sliding window
temporal_network(biblio_data, author_network, "collaboration",
                 window = 2, strategy = "sliding")

# Cumulative
temporal_network(biblio_data, reference_network,
                 threshold = 0, strategy = "cumulative", window = 2)

# With string name
temporal_network(biblio_data, "keyword_network", window = 3)

bibnets documentation built on June 19, 2026, 1:06 a.m.