% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/core-metadata.R
\name{extract_var_note}
\alias{extract_var_note}
\title{Extract Analyst Notes}
\usage{
extract_var_note(x, ..., format = "named_vector", 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{"named_vector"} (default),
\code{"list"}, or \code{"data_frame"}.}

\item{fill}{Scalar or \code{NULL}. How to handle variables with no note:
\code{NULL} (default) omits them; \code{NA_character_} includes them with \code{NA}.}
}
\value{
\itemize{
\item \code{"named_vector"} (default): named character vector. Empty: \code{character(0)}.
\item \code{"list"}: named list of character scalars. Empty: \code{list()}.
\item \code{"data_frame"}: tibble with columns \code{variable} and \code{note}. Empty:
zero-row tibble.
}
}
\description{
Returns analyst notes for one or more variables in a survey design object
or data frame.
}
\examples{
d <- as_survey(gss_2024, ids = vpsu, weights = wtssps,
               strata = vstrat, nest = TRUE)
d <- set_var_note(d, age = "Top-coded at 89")
extract_var_note(d, age)

}
\seealso{
\code{\link[=set_var_note]{set_var_note()}} to set a note

Other metadata: 
\code{\link{classify_question_type}()},
\code{\link{extract_metadata}()},
\code{\link{extract_missing_codes}()},
\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{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}
