% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/contact-matrix-utils.R
\name{add_age}
\alias{add_age}
\title{Add age column from exact age (generic helper)}
\usage{
add_age(data, prefix)
}
\arguments{
\item{data}{A data.table containing age data}

\item{prefix}{Column name prefix: "part_age" for participants, "cnt_age" for
contacts}
}
\value{
The data with the age column set from exact ages or
initialised to NA
}
\description{
Generic function to add an age column from an exact age column. Works for
both participant and contact data by specifying the column prefix.
If \verb{<prefix>_exact} exists, it overwrites \verb{<prefix>} with its values.
Otherwise, it creates \verb{<prefix>} with NA values if it doesn't exist.
}
\keyword{internal}
