% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/unique_check.R
\name{unique_check}
\alias{unique_check}
\title{Check Unique Identifier}
\usage{
unique_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{UniqueCheck}
containing row-level uniqueness diagnostics.
}
\description{
Evaluates whether a variable can serve as a unique
identifier by checking for missing and duplicated values.
}
\details{
Each observation is evaluated for missing and duplicated
identifier values.

A value is considered duplicated when it occurs more than
once among non-missing observations. All occurrences of a
repeated value are flagged.

Missing values are flagged separately and are not treated
as duplicated values.

The output contains:

\itemize{
\item \code{Row}: row number.
\item \code{Value}: identifier value.
\item \code{Missing}: whether the value is missing.
\item \code{Duplicate}: whether the non-missing value
occurs more than once.
\item \code{ValidUnique}: whether the value is both
non-missing and unique.
}
}
\examples{
dat <- data.frame(
  Animal_ID = c(101, 102, 102, 103, NA)
)

unique_check(
  dat,
  "Animal_ID"
)

}
