% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sf_choices.R
\name{sf_choices}
\alias{sf_choices}
\title{Define a reusable choice set}
\usage{
sf_choices(id, values, labels, allow_other = FALSE, randomise = FALSE)
}
\arguments{
\item{id}{Character. A unique identifier for this choice set. Referenced in
the \code{choice_set} argument of \code{\link[=sf_item]{sf_item()}}.}

\item{values}{Character or numeric vector. The stored values corresponding
to each response option. Must have the same length as \code{labels}.}

\item{labels}{Character vector. The display labels shown to respondents.
Must have the same length as \code{values}.}

\item{allow_other}{Logical. Whether to append an open-text "Other" option
at the end of the choice list. Defaults to \code{FALSE}.}

\item{randomise}{Logical. Whether to randomise the display order of options
at render time. Defaults to \code{FALSE}.}
}
\value{
An object of class \code{sf_choices} (a named list).
}
\description{
Creates a named set of response options that can be referenced by one or
more items. Defining choices once and referencing them by \code{id} keeps the
instrument consistent and reduces the risk of label mismatches across items
that share the same response format.
}
\examples{
# A five-point agreement scale
agree5 <- sf_choices(
  id     = "agree5",
  values = 1:5,
  labels = c("Strongly disagree", "Disagree", "Neutral",
             "Agree", "Strongly agree")
)

# A yes/no set
yn <- sf_choices(
  id     = "yn",
  values = c("yes", "no"),
  labels = c("Yes", "No")
)
}
\seealso{
\code{\link[=sf_item]{sf_item()}}, \code{\link[=sf_instrument]{sf_instrument()}}
}
