
ClassificationResult: structured outcome of running a key
Source:R/class-ClassificationResult.R
ClassificationResult.RdClassificationResult: structured outcome of running a key
ClassificationResult: structured outcome of running a key
Details
Returned by classify_wrb2022 (and the future
classify_sibcs). Carries the full decision trace — which RSGs
were tested, which passed, which failed, which were indeterminate
because of missing data — plus the assigned class, qualifiers,
ambiguities (RSGs that nearly satisfied), missing data that would
refine the result, the provenance-aware evidence grade, and any
biogeographical or prior-based warnings.
Public fields
systemCharacter.
"WRB 2022"or"SiBCS 5".nameCharacter. Full classification name with qualifiers (e.g.
"Rhodic Ferralsol (Clayic, Dystric, Humic)").rsg_or_orderCharacter. Bare RSG (WRB) or order (SiBCS), e.g.
"Ferralsols".qualifiersList. Principal and supplementary qualifiers in canonical order.
traceList. One element per RSG tested (in key order), each with
code,name,passed,evidence,missing.ambiguitiesList. RSGs that came close to passing — useful hints for follow-up measurements.
missing_dataCharacter vector. Attributes whose measurement would refine or resolve the result.
evidence_gradeCharacter.
"A"(measured),"B"(spectra-predicted),"C"(prior-inferred),"D"(VLM-extracted),"E"(user-assumed), orNA_character_when no horizon carries a soil property (only depths and designations; since v0.9.213), so nothing in the class was verified.prior_checkList or NULL. Result of the spatial-prior sanity check (consistent / inconsistent / not run).
warningsCharacter vector. Free-form warnings.
system_idCharacter. Registry id of the system (see
soilkey_systems), e.g."wrb2022"; since v0.9.265.levelsdata.framewith one row per level of the key that assigned a class (level,code,name), top level first; set by the generic classifier of ordered keys andNULLfor WRB, SiBCS and USDA, whose levels are intrace.provisional_becauseCharacter vector. In a first-match key a class that could not be decided for lack of data, tested before the one assigned, makes the assignment provisional; these are those classes, as
"<level>:<code>". Empty when the assignment is firm or the classifier does not report it.phasesSoil phases of the systems that have them (the SCSJ 2017: temperature, man-made and forest phases; the CSCJ 2011: temperature and man-made phases), a
data.framewithkind,code,name,name_nativeandbasis;NULLotherwise. Since v0.9.324. The FAO-Unesco Revised Legend (since v0.9.386) gives every phase three-valued, withstatus,presentandcriterion, and the classes of the map symbol (classify_fao).candidatesFor the systems that attach a soil to several classes rather than key it to one (the French Referentiel pedologique 2008, since v0.9.346,
classify_rp2008), every class that may attach it: adata.framewithcode,name,group,degree(simple, simple_or_imperfect, imperfect, undecided; fail for the nearest classes when nothing attaches),rank(the order of precedence),in_name,double_with,double_possible,n_failed,distance(the size of the failures in tolerance units),failed,imperfect_by,undecided_by,excluded_by(the criteria, joined with "; ") andnearest.NULLfor every other system, and then not printed. Since v0.9.340.humus_formThe humus form of the French Referentiel pedologique 2008 (Annex 1;
humus_form_rp), a one-rowdata.framewithform,name,type,label,group,decided,route,candidates,recorded,conflictandqualifiers; the whole reading is intrace$humus_form.NULLfor every other system. Since v0.9.353.
Methods
Method new()
Build a ClassificationResult.
Usage
ClassificationResult$new(
system,
name,
rsg_or_order = NA_character_,
qualifiers = list(),
trace = list(),
ambiguities = list(),
missing_data = character(0),
evidence_grade = NA_character_,
prior_check = NULL,
warnings = character(0),
system_id = NULL,
levels = NULL,
provisional_because = character(0),
candidates = NULL
)Arguments
systemSystem name.
nameClassification name.
rsg_or_orderRSG (WRB) or order (SiBCS).
qualifiersList of qualifier names.
traceList of per-RSG test entries.
ambiguitiesList of close-call RSGs.
missing_dataCharacter vector.
evidence_gradeSingle character A/B/C/D or NA.
prior_checkList or NULL.
warningsCharacter vector.
system_idRegistry id of the system, or NULL.
levelsAssigned class per level (data.frame), or NULL.
provisional_becauseCharacter vector of undecided classes tested before the assigned ones.
candidatesThe classes that may attach the soil (a data.frame), or NULL; since v0.9.340.
Method print()
Pretty-print the result with key trace, ambiguities, and warnings.
Method summary()
Compact summary list.
Method report()
Render this classification as a self-contained
report (delegates to the package-level
report generic). HTML output is
dependency-free; PDF requires rmarkdown
and a working LaTeX engine.
Usage
ClassificationResult$report(
file,
format = c("auto", "html", "pdf"),
pedon = NULL,
...
)Arguments
fileOutput path. Format is inferred from the extension.
formatOne of "html" or "pdf" (defaults to "auto", which infers from the extension).
pedonOptional
PedonRecordwhose horizons / provenance are added to the report....Forwarded to
report_htmlorreport_pdf.