% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/key-wrb2022.R
\name{run_wrb_key}
\alias{run_wrb_key}
\title{Run the WRB 2022 key over a pedon}
\usage{
run_wrb_key(pedon, rules = NULL)
}
\arguments{
\item{pedon}{A \code{\link{PedonRecord}}.}

\item{rules}{Optional pre-loaded rule set; if NULL, reads
\code{inst/rules/wrb2022/key.yaml}.}
}
\value{
A list with \code{assigned} (the YAML entry for the assigned
        RSG) and \code{trace} (one entry per RSG tested, in order).
}
\description{
Iterates over the RSGs in canonical key order; the first RSG whose
tests pass is assigned. RSGs whose tests return NA (stubbed
diagnostics or insufficient data) are skipped and recorded in the
trace.
}
