% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gho.R
\name{gho_dimensions}
\alias{gho_dimensions}
\title{List Dimensions of a GHO Indicator}
\usage{
gho_dimensions(indicator, dimension = "SpatialDimType")
}
\arguments{
\item{indicator}{Character scalar. The indicator code
(e.g. \code{"NCDMORT3070"}).}

\item{dimension}{Character. Name of the dimension column in the
indicator data. Common values include \code{"SpatialDim"},
\code{"SpatialDimType"}, \code{"TimeDim"}, \code{"Dim1"}, \code{"Dim2"}, and
\code{"Dim3"}. Case-sensitive (it is sent to the server as an OData
\verb{$select} field name). Default \code{"SpatialDimType"}.}
}
\value{
A character vector of unique, sorted dimension values,
or an empty character vector when the service is unreachable
or the dimension is missing.
}
\description{
Returns the unique values of a given dimension across all
observations of a GHO indicator. Useful for discovering which
ages, sexes, regions, or other breakdowns are available before
calling \code{\link[=gho_data]{gho_data()}}.
}
\details{
Only the requested column is downloaded (via the OData \verb{$select}
query option), so this is a lightweight metadata query even for
indicators with hundreds of thousands of observations. A
\code{dimension} that is not a column of the GHO data table (e.g. a
misspelling) makes the server reject the request; the failure
surfaces as a warning and an empty character vector.
}
\examples{
\donttest{
gho_dimensions("NCDMORT3070")
gho_dimensions("NCDMORT3070", dimension = "Dim1")
}
}
\seealso{
\code{\link[=gho_data]{gho_data()}}, \code{\link[=gho_indicators]{gho_indicators()}}.
}
