% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/core-metadata.R
\name{set_question_preface}
\alias{set_question_preface}
\title{Set Question Preface(s)}
\usage{
set_question_preface(x, ..., variable = NULL, preface = NULL)
}
\arguments{
\item{x}{A survey design object or a data frame.}

\item{...}{Named arguments where the name is the variable and the value is
the preface string. Supports \verb{!!!} list splicing.}

\item{variable}{A character vector of variable names. Use with \code{preface}.}

\item{preface}{A character vector of preface strings, one per element of
\code{variable}.}
}
\value{
The modified object, invisibly.
}
\description{
Sets the question preface string for one or more variables. Question prefaces
are the shared introductory text for a battery of related questions.
}
\details{
Supports Conventions 1, 2, and 3 — see \code{\link[=set_var_label]{set_var_label()}} for details.
}
\examples{
d <- as_survey(gss_2024, ids = vpsu, weights = wtssps,
               strata = vstrat, nest = TRUE)
d <- set_question_preface(d, happy = "Taken all together...")
extract_question_preface(d, happy)

}
\seealso{
\code{\link[=extract_question_preface]{extract_question_preface()}} to retrieve a preface

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{extract_var_note}()},
\code{\link{infer_question_prefaces}()},
\code{\link{set_missing_codes}()},
\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}
