% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/panel_utils.R
\name{.make_panel}
\alias{.make_panel}
\title{Prepare a panel data frame}
\usage{
.make_panel(data, unit_index = NULL, time_index = NULL, index = NULL)
}
\arguments{
\item{data}{A data.frame.}

\item{unit_index}{Character scalar: name of the unit identifier column.}

\item{time_index}{Character scalar: name of the time identifier column.}

\item{index}{Character vector of length 2 (legacy): \code{c(unit_col, time_col)}. Ignored if \code{unit_index} and \code{time_index} are provided.}
}
\value{
A sorted data.frame with attributes \code{unit_var} and \code{time_var}.
}
\description{
Validates the data and index columns, sorts by unit then time, and attaches
\code{"unit_var"} and \code{"time_var"} attributes. Accepts either the new
\code{unit_index}/\code{time_index} arguments or the legacy \code{index} argument.
}
\keyword{internal}
