% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/core-metadata.R
\name{extract_missing_codes}
\alias{extract_missing_codes}
\title{Extract Missing Value Codes}
\usage{
extract_missing_codes(x, ..., format = "list", fill = NULL)
}
\arguments{
\item{x}{A survey design object or \code{data.frame}.}

\item{...}{<\code{\link[tidyselect:language]{tidy-select}}> Variables to query.
Supports selection helpers: \code{\link[tidyselect:starts_with]{tidyselect::starts_with()}},
\code{\link[tidyselect:all_of]{tidyselect::all_of()}}, \code{\link[tidyselect:all_of]{tidyselect::any_of()}}, \code{\link[tidyselect:starts_with]{tidyselect::matches()}},
etc. If empty, returns metadata for all variables. Use
\code{\link[tidyselect:all_of]{tidyselect::any_of()}} to silently skip missing variable names.}

\item{format}{\code{character(1)}. Output format: \code{"list"} (default) or
\code{"data_frame"}. \code{"named_vector"} is not valid for this function.}

\item{fill}{Scalar or \code{NULL}. How to handle variables with no codes:
\code{NULL} (default) omits them; \code{NA_character_} includes them as \code{NULL}
entries in \code{"list"} format.}
}
\value{
\itemize{
\item \code{"list"} (default): named list of atomic vectors. Empty: \code{list()}.
\item \code{"data_frame"}: long-format tibble with columns \code{variable}, \code{description}
(\code{NA} if codes vector is unnamed), \code{code} (coerced to character). Empty:
zero-row tibble.
}
}
\description{
Returns missing value sentinel codes for one or more variables in a survey
design object or data frame.
}
\examples{
d <- as_survey(nhanes_2017, ids = sdmvpsu, weights = wtint2yr,
               strata = sdmvstra, nest = TRUE)
d <- set_missing_codes(d, ridageyr = c("Not applicable" = 999L))
extract_missing_codes(d, ridageyr)
extract_missing_codes(d, ridageyr, format = "data_frame")

}
\seealso{
\code{\link[=set_missing_codes]{set_missing_codes()}} to set missing value codes

Other metadata: 
\code{\link{classify_question_type}()},
\code{\link{extract_metadata}()},
\code{\link{extract_question_preface}()},
\code{\link{extract_sata}()},
\code{\link{extract_universe}()},
\code{\link{extract_val_labels}()},
\code{\link{extract_var_label}()},
\code{\link{extract_var_note}()},
\code{\link{infer_question_prefaces}()},
\code{\link{set_missing_codes}()},
\code{\link{set_question_preface}()},
\code{\link{set_sata}()},
\code{\link{set_universe}()},
\code{\link{set_val_labels}()},
\code{\link{set_var_label}()},
\code{\link{set_var_note}()},
\code{\link{survey_metadata}()},
\code{\link{survey_weighting_history}()}
}
\concept{metadata}
