% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_engine.R
\name{compute_table}
\alias{compute_table}
\title{Compute a single table from a registry entry}
\usage{
compute_table(entry, design, data = NULL)
}
\arguments{
\item{entry}{A single list element from \code{\link[=steps_table_registry]{steps_table_registry()}}.}

\item{design}{A survey design object (from \code{\link[survey:svydesign]{survey::svydesign()}}).}

\item{data}{The cleaned data frame (used for variable availability checks).}
}
\value{
A list with:
\describe{
\item{id}{Table identifier.}
\item{title}{Table title.}
\item{type}{Table type.}
\item{available}{Logical: TRUE if the required variable(s) exist.}
\item{results}{A list of data frames:
For proportion: total, by_sex, by_age (each with estimate, lower, upper).
For mean: total, by_sex, by_age (each with estimate, lower, upper).
For category: total, by_sex, by_age (each with level, estimate, lower, upper).
For cascade: named list of proportion results.
}
}
}
\description{
This is the main workhorse: given one registry entry and a survey design,
it dispatches to the appropriate method based on \code{entry$type} and returns
a standardised result list.
}
