% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/covariates.R
\name{cov_node_static}
\alias{cov_node_static}
\title{Create a static node-level covariate}
\usage{
cov_node_static(
  name,
  data,
  role = c("both", "sender", "receiver"),
  warn_missing = TRUE
)
}
\arguments{
\item{name}{Character scalar. Column name(s) added to the risk set.
When \code{role = "both"}, two columns are added: \verb{<name>_snd} and
\verb{<name>_rec}. Otherwise a single column named \verb{<name>} is added.}

\item{data}{Data frame with columns \code{node} (integer-coercible) and
\code{value} (numeric). One row per node.}

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

\item{warn_missing}{Logical. Warn when a node in the risk set has no
matching row in \code{data} (default \code{TRUE}).}
}
\value{
An object of class \code{c("cov_node_static", "rem_cov")}.
}
\description{
Adds one or two columns to each risk-set row based on the sender's and/or
receiver's value in a node attribute table.
}
\examples{
gdp <- data.frame(node = 1:4, value = c(1.2, 0.8, 2.1, 0.5))
cov <- cov_node_static("GDP", gdp, role = "sender")
}
