% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/whitespace_check.R
\name{whitespace_check}
\alias{whitespace_check}
\title{Check Leading and Trailing Whitespace}
\usage{
whitespace_check(data, variable)
}
\arguments{
\item{data}{A data.frame.}

\item{variable}{A single character string specifying the
variable to check.}
}
\value{
A data.frame of class \code{WhitespaceCheck}
containing row-level whitespace diagnostics.
}
\description{
Detects leading and trailing whitespace in a character
or factor variable.
}
\details{
Missing values are reported separately and are not
classified as whitespace problems.

The function detects leading whitespace, trailing
whitespace, and values consisting entirely of whitespace.
It does not modify the original data.
}
\examples{
dat <- data.frame(
  Species = c("Dog", " Cat", "Cattle ", " Goat ", NA)
)

whitespace_check(
  dat,
  variable = "Species"
)

}
