% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/length_check.R
\name{length_check}
\alias{length_check}
\title{Check Character Length}
\usage{
length_check(
  data,
  variable,
  min_length = NULL,
  max_length = NULL,
  exact_length = NULL
)
}
\arguments{
\item{data}{A data.frame.}

\item{variable}{A single character string specifying the
variable to check.}

\item{min_length}{Optional minimum acceptable number of
characters.}

\item{max_length}{Optional maximum acceptable number of
characters.}

\item{exact_length}{Optional exact required number of
characters.}
}
\value{
A data.frame of class \code{LengthCheck}
containing row-level length diagnostics.
}
\description{
Checks the number of characters in a character or factor
variable and identifies values outside user-defined
length limits.
}
\details{
The selected variable must be character or factor.

Missing values are reported separately and are not
classified as length violations.

If \code{exact_length} is supplied, \code{min_length}
and \code{max_length} must both be NULL.
}
\examples{
dat <- data.frame(
  Sample_ID = c("A01", "A002", "B12", NA)
)

length_check(
  dat,
  variable = "Sample_ID",
  exact_length = 3
)

}
