% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tables.R
\name{build_steps_tables}
\alias{build_steps_tables}
\title{Build survey-weighted tables for STEPS indicators}
\usage{
build_steps_tables(indicators)
}
\arguments{
\item{indicators}{A list of indicator results from \code{\link[=compute_all_indicators]{compute_all_indicators()}},
containing elements like \code{tobacco}, \code{alcohol}, \code{diet_pa}, \code{anthropometry},
\code{blood_pressure}, \code{biochemical}, etc. Each indicator list should contain
\verb{*_total}, \verb{*_by_sex}, and \verb{*_by_age} elements.}
}
\value{
A named list of flextable objects, one per indicator.
Names correspond to indicators (e.g., \code{current_tobacco}, \code{raised_bp}).
NULL entries are excluded. Prints count of tables generated.
}
\description{
Generates formatted flextable objects for all available STEPS indicators,
with rows for age groups and columns for both sexes combined, males, and
females. Tables include 95\% confidence intervals.
}
\details{
Each table has age groups as rows and prevalence (with 95\% CI) as a column.
The last row shows the total (age-standardised) estimate.
Column header styling uses WHO STEPS branding (dark blue background).
}
\examples{
\donttest{
  test_data <- generate_test_data(n = 500, seed = 42)
  cols <- detect_steps_columns(test_data)
  clean <- clean_steps_data(test_data, cols)
  design <- setup_survey_design(clean)
  all_ind <- compute_all_indicators(design)
  tables <- build_steps_tables(all_ind$results)
  names(tables)
}

}
