% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/validate.R
\name{validate_t.test2}
\alias{validate_t.test2}
\title{Validate Grouping Variable for t.test2()}
\usage{
validate_t.test2(
  group_var_name,
  data = NULL,
  calling_env = parent.frame(),
  data_name = NULL
)
}
\arguments{
\item{group_var_name}{Character string. Name of the grouping variable (for error messages).}

\item{data}{An optional data frame containing the variable.}

\item{calling_env}{The environment in which to look for the variable if data is not provided.}

\item{data_name}{Character string. Name of the data argument (for error messages).
If NULL, will attempt to infer from the call.}
}
\value{
The validated grouping variable (numeric or factor vector). Stops execution with an error message if validation fails.
}
\description{
Validates that a grouping variable exists and has exactly 2 levels for t-test.
}
\keyword{internal}
