% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/efo_dispatcher.R
\name{get_efo_table}
\alias{get_efo_table}
\title{Get any EFO detailed-forecast table by id}
\usage{
get_efo_table(table_id, vintage = NULL, refresh = FALSE)
}
\arguments{
\item{table_id}{Character. The EFO table identifier, e.g. \code{"6.5"},
\code{"1.7"}, \code{"6.13"}. See \code{\link[=obr_efo_catalogue]{obr_efo_catalogue()}} for the full list.}

\item{vintage}{Optional EFO vintage label (e.g. \code{"October 2024"}). If
\code{NULL}, uses any pin set via \code{\link[=obr_pin]{obr_pin()}} or falls back to the latest
live EFO.}

\item{refresh}{Logical. If \code{TRUE}, re-download even if a cached copy
exists. Defaults to \code{FALSE}.}
}
\value{
An \code{obr_tbl} with the standard v0.4.0 schema columns
(\code{period}, \code{period_type}, \code{series}, \code{metric_type}, \code{value}, \code{unit}).
Returns \code{NULL} (with a warning) for cross-reference sheets.
}
\description{
Generic fetcher that takes an EFO table identifier (e.g. \code{"6.5"},
\code{"1.7"}, \code{"4.1"}) and returns the parsed contents in the standard
v0.4.0 schema. Use \code{\link[=obr_efo_catalogue]{obr_efo_catalogue()}} to discover which tables
are available.
}
\details{
Internally, this function looks up \code{table_id} in the catalogue, fetches
the right workbook (Aggregates or Economy), dispatches to a layout-
specific parser, and tags every row with \code{metric_type} and \code{unit}
according to the catalogue's defaults plus per-row classification.

Coverage today: 17 fiscal Aggregates tables + 22 macro Economy tables.
One sheet (6.11 PSND year-on-year changes) is a cross-reference to a
previous EFO and returns \code{NULL} with a warning rather than data; OBR
itself directs users to the previous EFO for that table.

Headline functions \code{\link[=get_efo_fiscal]{get_efo_fiscal()}} and \code{\link[=get_efo_economy]{get_efo_economy()}} are kept
as thin wrappers over this dispatcher.
}
\examples{
\donttest{
op <- options(obr.cache_dir = tempdir())
try({

  # Net borrowing components (same data as get_efo_fiscal())
  get_efo_table("6.5")

  # CPI category inflation by year
  get_efo_table("1.19")

  # Composition of public sector net debt
  get_efo_table("6.13")

  # Pin to a specific vintage
  get_efo_table("6.5", vintage = "October 2024")
})
options(op)
}

}
\seealso{
Other EFO: 
\code{\link{get_efo_economy}()},
\code{\link{get_efo_fiscal}()},
\code{\link{get_monthly_profiles}()},
\code{\link{list_efo_economy_measures}()},
\code{\link{obr_efo_catalogue}()}
}
\concept{EFO}
