% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/covariates.R
\name{cov_node_temporal}
\alias{cov_node_temporal}
\title{Create a temporal node-level covariate}
\usage{
cov_node_temporal(
  name,
  data,
  role = c("both", "sender", "receiver"),
  warn_missing = TRUE
)
}
\arguments{
\item{name}{Character scalar.}

\item{data}{Data frame with columns \code{node} (integer-coercible),
\code{time_start} (numeric), and \code{value} (numeric). Rows need not be
sorted; sorting is done internally.}

\item{role}{One of \code{"both"} (default), \code{"sender"}, or \code{"receiver"}.}

\item{warn_missing}{Logical.}
}
\value{
An object of class \code{c("cov_node_temporal", "rem_cov")}.
}
\description{
Like \code{\link[=cov_node_static]{cov_node_static()}} but values change at known time breakpoints.
The active value at event time \code{t} is the one with the largest
\code{time_start <= t} (step function).
}
\examples{
sanctions <- data.frame(
  node = c(1L, 1L, 2L), time_start = c(0, 10, 5), value = c(0, 1, 1)
)
cov <- cov_node_temporal("Sanctioned", sanctions, role = "receiver")
}
