% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sequence-data.R
\name{validate_sequence_data}
\alias{validate_sequence_data}
\title{Validate Long-Format Sequence Data}
\usage{
validate_sequence_data(
  data,
  sequence_id_col,
  order_col,
  state_col,
  duration_col = NULL,
  metadata_cols = NULL,
  expected_states = NULL
)
}
\arguments{
\item{data}{A data frame containing ordered state observations.}

\item{sequence_id_col}{Name of the sequence identifier column.}

\item{order_col}{Name of the numeric sequence-order column.}

\item{state_col}{Name of the categorical state column.}

\item{duration_col}{Optional name of a numeric duration column.}

\item{metadata_cols}{Optional character vector naming columns that should
remain constant within each sequence.}

\item{expected_states}{Optional vector of known or permitted state values.}
}
\value{
A named list containing \code{valid}, \code{status}, issue counts, the
complete \code{audit} table, the column \code{mapping}, row and sequence counts,
and observed \code{state_levels}. A result is valid when no error-severity
issue is present. Review-severity issues do not automatically invalidate
the input.
}
\description{
Produces a compact validation result based on
\code{audit_sequence_data()} without modifying the input.
}
\examples{
sequences <- data.frame(
  id = rep(c("s1", "s2"), each = 2L),
  position = rep(1:2, times = 2L),
  state = c("home", "search", "home", "product")
)

validation <- validate_sequence_data(
  sequences,
  sequence_id_col = "id",
  order_col = "position",
  state_col = "state"
)

validation$status
validation$valid

}
