% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coverage.R
\name{coverage_report}
\alias{coverage_report}
\title{Honest taxonomic-completeness report}
\usage{
coverage_report(
  system = c("usda_subgroup", "usda_great_group", "usda_suborder", "wrb_qualifiers",
    "sibcs"),
  write = FALSE,
  report_dir = NULL
)
}
\arguments{
\item{system}{Which axis to measure. USDA taxon levels against the Soil
Taxonomy 13th-edition code set (\code{\link{kst13_codes}}):
\code{"usda_subgroup"} (default), \code{"usda_great_group"},
\code{"usda_suborder"}. WRB 2022 qualifiers against
\code{\link{wrb2022_canonical}}: \code{"wrb_qualifiers"} -- here "covered"
means the \code{qual_*} function exists \emph{and} is a genuine
implementation (not an unconditional \code{passed = NA} stub), and the
inert ones are returned in \code{$stubs}. \code{"sibcs"} has no external
canonical class list, so it honestly reports registered class counts per
level only (no percentage).}

\item{write}{If \code{TRUE}, also write a Markdown summary to
\code{report_dir}. Default \code{FALSE}.}

\item{report_dir}{Directory for the Markdown report when \code{write = TRUE}.
Defaults to \code{inst/benchmarks/reports} inside the installed package.}
}
\value{
Invisibly, a list with \code{$overall} (one-row data frame:
  \code{system}, \code{level}, \code{canonical_n}, \code{registered_n},
  \code{covered_n}, \code{missing_n}, \code{pct}), \code{$by_group} (per
  order, or per principal/supplementary), \code{$missing} (canonical names
  not registered), \code{$extra} (registered names absent from the canonical
  set), and -- for \code{"wrb_qualifiers"} -- \code{$stubs} (functions that
  exist but are inert). A compact summary is printed as a side effect.
}
\description{
Measures, by NAME, exactly which canonical taxa/qualifiers the package's
deterministic rule base registers, replacing hand-maintained coverage
claims with an auditable, reproducible diff. For \code{"usda_subgroup"} the
canonical reference is the Soil Taxonomy 13th-edition subgroup set from
\code{\link{kst13_codes}}; for \code{"wrb_qualifiers"} it is the WRB 2022
principal + supplementary qualifier set from \code{\link{wrb2022_canonical}}.
}
\examples{
cov <- coverage_report("usda_subgroup")
cov$overall
head(cov$missing)

}
