% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/HelperFunctions.R
\name{safe_replace_var}
\alias{safe_replace_var}
\title{Safely Replace Variable Names in Printed Terms}
\usage{
safe_replace_var(x, old, new)
}
\arguments{
\item{x}{Character vector to modify.}

\item{old}{Character scalar, original variable name.}

\item{new}{Character scalar, replacement variable name.}
}
\value{
Character vector with safe term-wise replacements.
}
\description{
Replaces a variable name only when it appears as a standalone term,
avoiding accidental replacements inside other words.
}
\details{
Useful for plot formula labels, for example replacing "t" with "that"
without changing "intercept" into "inthatercept".
}
\keyword{internal}
