% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sampling.R
\name{audit_gazepoint_biometric_sampling}
\alias{audit_gazepoint_biometric_sampling}
\title{Audit Gazepoint biometric sampling and timing}
\usage{
audit_gazepoint_biometric_sampling(
  data,
  group_columns = NULL,
  time_column = NULL,
  time_unit = c("seconds", "milliseconds", "microseconds", "samples"),
  expected_rate_hz = 60,
  tolerance_hz = 5
)
}
\arguments{
\item{data}{A data frame or a path to a Gazepoint CSV export.}

\item{group_columns}{Optional grouping columns within which timing should be
audited, such as \code{c("source_participant", "MEDIA_ID")}.}

\item{time_column}{Optional time/order column. If \code{NULL}, the function uses
the first available column among \code{TIME}, \code{TIME_TICK}, and \code{CNT}.}

\item{time_unit}{Unit of the selected time column. Use \code{"seconds"},
\code{"milliseconds"}, \code{"microseconds"}, or \code{"samples"}. When \code{"samples"} is
used, sampling-rate estimates are returned as \code{NA}.}

\item{expected_rate_hz}{Optional expected sampling rate in Hz.}

\item{tolerance_hz}{Acceptable absolute deviation from \code{expected_rate_hz}.}
}
\value{
A data frame with one row per group.
}
\description{
Audits timing or row-order information in Gazepoint Biometrics exports. The
function checks monotonicity, duplicate timestamps, nonpositive intervals,
and estimated sampling rate when the selected time column has a real time
unit. If only \code{CNT} is available, the function can still check ordering but
does not estimate a sampling rate unless \code{time_unit} is explicitly meaningful.
}
