% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/forest_utils.R
\name{should_condense_binary}
\alias{should_condense_binary}
\title{Check if a binary variable should be condensed without category suffix}
\usage{
should_condense_binary(ref_category, non_ref_category, label = NULL)
}
\arguments{
\item{ref_category}{Character string with the reference category name
(the level with NA estimate).}

\item{non_ref_category}{Character string with the non-reference category name
(the level with the actual estimate).}

\item{label}{Optional character string with the variable label. Used for
intelligent matching (\emph{e.g.,} "30-Day Readmission" label with 
"30-day readmission" / "No 30-day readmission" levels).}
}
\value{
Logical indicating whether the binary variable should be condensed
  without appending the category name.
}
\description{
Uses a greedy/liberal approach to determine if a binary variable's condensed
display should omit the category name. Returns \code{TRUE} if EITHER level of the
binary variable is a standard reference/affirmative value, OR if either level
matches/contains the variable label.
}
\details{
This function is designed for binary (2-level) categorical variables where
one level is a reference and one is the "event" or "condition" level.
}
\keyword{internal}
