% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_dep_label_prefix}
\alias{get_dep_label_prefix}
\title{Retrieve the dep label prefix from a saros output object}
\usage{
get_dep_label_prefix(obj)
}
\arguments{
\item{obj}{Any object returned by \code{\link[=makeme]{makeme()}} or a \verb{make_content.*()} method
(ggplot, data.frame, mschart, …).}
}
\value{
A character scalar: the dep label prefix if present and non-empty,
otherwise \code{""}.
}
\description{
Retrieves the \code{"dep_label_prefix"} attribute that saros attaches to every
object returned by \code{\link[=makeme]{makeme()}} / \verb{make_content.*()}. This is the main
question text — the shared label prefix of all dependent variables used to
produce the object.
}
\details{
Storage location by class:
\itemize{
\item \strong{ggplot / gg} and \strong{ms_barchart}: attribute is stored on \code{obj$data}
(when \code{obj$data} is a data.frame) so that it survives further \code{+}
operations. This function reads from \code{obj$data} first for both classes.
\item \strong{data.frame and other objects}: attribute stored directly on \code{obj}.
}
}
\examples{
p <- makeme(data = ex_survey, dep = b_1:b_3)
get_dep_label_prefix(p)
}
