% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/report-html.R
\name{report}
\alias{report}
\title{Render a soilKey classification report}
\usage{
report(
  x,
  file,
  format = c("auto", "html", "pdf"),
  pedon = NULL,
  title = NULL,
  include_family = FALSE,
  specifiers = FALSE,
  lang = c("en", "pt"),
  ...
)
}
\arguments{
\item{x}{A \code{ClassificationResult}, a list of
\code{ClassificationResult}s, or a \code{PedonRecord}
(in which case all three keys are run automatically).}

\item{file}{Output path. The format is inferred from the extension
(\code{.html} or \code{.pdf}) unless \code{format} is
given explicitly.}

\item{format}{One of \code{"auto"}, \code{"html"}, \code{"pdf"}.}

\item{pedon}{Optional \code{PedonRecord}; when provided, its
horizons table and provenance log are included.}

\item{title}{Optional report title.}

\item{include_family}{When \code{x} is a \code{PedonRecord} (so the
three keys are run here), passes through to
\code{\link{classify_usda}} to append the USDA family
(5th category) to the subgroup. Default \code{FALSE} keeps
the output byte-identical to earlier versions.}

\item{specifiers}{When \code{x} is a \code{PedonRecord}, passes through
to \code{\link{classify_wrb2022}} to attach WRB depth
specifiers (Epi-/Endo-/...) to depth-anchored qualifiers.
Default \code{FALSE}. Both flags are ignored when \code{x}
is already a (list of) \code{ClassificationResult}.}

\item{lang}{Report language; \code{"en"} (default) or \code{"pt"}
(Brazilian Portuguese).}

\item{...}{Passed to method-specific renderers.}
}
\value{
The output path, invisibly.
}
\description{
Produces a pedologist-facing report from one or more
\code{\link{ClassificationResult}} objects, optionally including the
source \code{\link{PedonRecord}}. The HTML output is fully
self-contained (single file, inline CSS); the PDF output goes through
\code{rmarkdown::render()} and therefore requires a working LaTeX
install (or one of the alternative engines accepted by
\code{rmarkdown}).
}
\details{
This is an S3 generic with methods for \code{ClassificationResult},
\code{list}, and \code{PedonRecord}. Most users call \code{report()}
directly with a list of three results
(\code{list(classify_wrb2022(p), classify_sibcs(p), classify_usda(p))})
to get a cross-system one-pager.
}
\examples{
pedon <- make_ferralsol_canonical()
out <- file.path(tempdir(), "soilkey_report.html")
report(pedon, file = out, pedon = pedon)
file.exists(out)
}
