
Classify a horizon spreadsheet in all three systems - one file, one line
Source:R/read-pedon-csv.R
classify_csv.RdThe shortest path from a spreadsheet to an answer. Reads file with
read_pedon_csv and returns the WRB 2022 / SiBCS / USDA names as
a one-row data.frame. Missing attributes are handled silently
(on_missing = "silent").
Usage
classify_csv(
file,
site = NULL,
sep = "auto",
systems = c("wrb", "sibcs", "usda")
)Arguments
- file
Path to a
.csv(comma) or.tsv(tab) file, one row per horizon.- site
Optional named list of site metadata (see
PedonRecord). Defaults tolist(id = <file base name>).- sep
Field separator.
"auto"(default) uses a tab for.tsvfiles and a comma otherwise.- systems
Character vector of systems to run; any of
"wrb","sibcs","usda"(default: all three).
Details
The full ClassificationResult objects (with the key trace,
evidence grade, qualifiers, ...) and the parsed PedonRecord are
attached as attributes "results" and "pedon" for anyone who
wants to dig deeper.
Examples
f <- system.file("extdata", "perfil_exemplo.csv", package = "soilKey")
classify_csv(f)
#> wrb
#> 1 Chromic Ferralsol (Clayic, Ochric, Rubic)
#> sibcs usda
#> 1 Latossolos Vermelhos Distróficos típicos, argilosa, moderado Typic Hapludox