Produces a pedologist-facing report from one or more
ClassificationResult objects, optionally including the
source PedonRecord. The HTML output is fully
self-contained (single file, inline CSS); the PDF output goes through
rmarkdown::render() and therefore requires a working LaTeX
install (or one of the alternative engines accepted by
rmarkdown).
Arguments
- x
A
ClassificationResult, a list ofClassificationResults, or aPedonRecord(in which case all three keys are run automatically).- file
Output path. The format is inferred from the extension (
.htmlor.pdf) unlessformatis given explicitly.- format
One of
"auto","html","pdf".- pedon
Optional
PedonRecord; when provided, its horizons table and provenance log are included.- title
Optional report title.
- include_family
When
xis aPedonRecord(so the three keys are run here), passes through toclassify_usdato append the USDA family (5th category) to the subgroup. DefaultFALSEkeeps the output byte-identical to earlier versions.- specifiers
When
xis aPedonRecord, passes through toclassify_wrb2022to attach WRB depth specifiers (Epi-/Endo-/...) to depth-anchored qualifiers. DefaultFALSE. Both flags are ignored whenxis already a (list of)ClassificationResult.- lang
Report language;
"en"(default) or"pt"(Brazilian Portuguese).- systems
When
xis aPedonRecord, the systems to run: any registered ids or aliases (seesoilkey_systems). The default runs WRB 2022, SiBCS and USDA, as reports always have; add a national system (e.g."cssc3") to include its result, with the class at each level, the classes left undecided before the assigned one and, for Hungary, the subtype and variety properties. Ignored whenxis already a (list of)ClassificationResult.- ...
Passed to method-specific renderers.
Details
This is an S3 generic with methods for ClassificationResult,
list, and PedonRecord. Most users call report()
directly with a list of three results
(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)
#> [1] TRUE
