% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/temporal-network.R
\name{temporal_network}
\alias{temporal_network}
\title{Build time-windowed networks}
\usage{
temporal_network(
  data,
  network_fun,
  ...,
  window = 3,
  step = NULL,
  strategy = "fixed",
  time_col = "year"
)
}
\arguments{
\item{data}{A data frame with a numeric time column.}

\item{network_fun}{Function or character string naming a network function
(e.g., \code{author_network}, \code{"reference_network"}, \code{conetwork}).}

\item{...}{Additional arguments passed to \code{network_fun} (e.g., \code{type},
\code{counting}, \code{similarity}, \code{threshold}, \code{top_n}).}

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

\item{step}{Integer or \code{NULL}. Step size between windows. Default \code{NULL}
(equals \code{window} for fixed, 1 for sliding).}

\item{strategy}{Character. Time window strategy:
\describe{
\item{\code{"fixed"}}{Disjoint non-overlapping windows (default).}
\item{\code{"sliding"}}{Overlapping windows advancing by \code{step} units.}
\item{\code{"cumulative"}}{Each window starts at the earliest value and
extends further.}
}}

\item{time_col}{Character. Name of the column containing the time variable.
Default \code{"year"}. Works with any numeric time unit: years, months,
quarters, semesters, weeks, etc. (e.g., \code{"month"}, \code{"quarter"}, \code{"time"}).}
}
\value{
A named list of data frames (edge lists). Names are window
labels like \code{"2018-2020"}.
}
\description{
Splits data by time windows and builds a separate network for each
window using any network function.
}
\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)
}
