Skip to contents

Inverse of as_aqp. Walks each profile in the SPC, renames aqp's canonical horizon column names back to soilKey's (top -> top_cm, name -> designation, clay -> clay_pct, ...), assembles a PedonRecord per profile, and returns the list.

Usage

from_aqp(spc)

Arguments

spc

A aqp::SoilProfileCollection.

Value

A list of PedonRecord objects (length = length(spc)).

Details

Round-trip property: from_aqp(as_aqp(pedon)) reproduces pedon modulo column ordering.

See also

as_aqp, the forward conversion.

Examples

if (FALSE) { # \dontrun{
pedons <- list(make_ferralsol_canonical(), make_luvisol_canonical())
spc <- as_aqp(pedons)
pedons2 <- from_aqp(spc)
identical(pedons[[1]]$horizons$clay_pct, pedons2[[1]]$horizons$clay_pct)
#> [1] TRUE
} # }