% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analysis-meta.R
\name{meta}
\alias{meta}
\alias{meta.survey_result}
\title{Extract Metadata from a Survey Result}
\usage{
meta(x, ...)

\method{meta}{survey_result}(x, ...)
}
\arguments{
\item{x}{A \code{survey_result} object returned by any \verb{get_*()} function.}

\item{...}{Currently unused. Reserved for future extensions.}
}
\value{
A named list. Common fields present on every result:
\describe{
\item{\code{design_type}}{Character(1). Design class: \code{"taylor"},
\code{"replicate"}, \code{"twophase"}, \code{"srs"}, or \code{"nonprob"}.}
\item{\code{conf_level}}{Numeric(1). Confidence level used (e.g. \code{0.95}).}
\item{\code{call}}{Language. Matched call to the \verb{get_*()} function.}
\item{\code{n_respondents}}{Integer(1). Total rows in the design, regardless
of groups, domain status, or weights.}
\item{\code{group}}{Named list. One entry per grouping variable; empty list
(\code{list()}) when no groups are active. Each entry is a named list with:
\code{variable_label} (character or \code{NULL}), \code{question_preface} (character
or \code{NULL}), \code{value_labels} (named vector or \code{NULL}).}
\item{\code{x}}{Named list. One entry per focal variable. Length 1 for
single-x functions (\code{get_means}, \code{get_totals}, \code{get_quantiles});
length N for multi-x functions (\code{get_freqs}, \code{get_corr}). Each entry
has the same sub-structure as \code{group} entries. \code{NULL} for
\code{get_totals()} when called without an \code{x} argument.}
}
Function-specific additional fields:
\describe{
\item{\code{probs}}{(\code{get_quantiles} only) Numeric vector of quantile
probabilities.}
\item{\code{method}}{(\code{get_corr} only) Character(1) correlation method.}
\item{\code{numerator}, \code{denominator}}{(\code{get_ratios} only) Flat named lists
with keys \code{name}, \code{variable_label}, \code{question_preface}, \code{value_labels}.}
}
}
\description{
Retrieves the structured metadata list attached to a survey result object
returned by any \verb{get_*()} analysis function.
}
\details{
This is the \strong{only} supported way to access result metadata — do not use
\code{attr(result, ".meta")} directly.
}
\examples{
# Construct a minimal survey_result to illustrate meta():
result <- structure(
  tibble::tibble(mean = 42.0, se = 1.5, n = 100L),
  .meta = list(
    design_type   = "taylor",
    conf_level    = 0.95,
    call          = quote(get_means(d, x)),
    n_respondents = 100L,
    group         = list(),
    x             = list(
      x = list(variable_label = NULL, question_preface = NULL,
               value_labels = NULL)
    )
  ),
  class = c("survey_means", "survey_result", "tbl_df", "tbl", "data.frame")
)
meta(result)$design_type    # "taylor"
meta(result)$n_respondents  # 100L
meta(result)$conf_level     # 0.95

}
\seealso{
Other analysis: 
\code{\link{clean}()},
\code{\link{get_anova}()},
\code{\link{get_corr}()},
\code{\link{get_covariance}()},
\code{\link{get_diffs}()},
\code{\link{get_freqs}()},
\code{\link{get_means}()},
\code{\link{get_pairwise}()},
\code{\link{get_quantiles}()},
\code{\link{get_ratios}()},
\code{\link{get_t_test}()},
\code{\link{get_totals}()},
\code{\link{get_variance}()}
}
\concept{analysis}
