SoilProfileCollection
ObjectsCut ("dice") soil horizons into 1-unit thick slices. This function replaces aqp::slice()
, which will be deprecated in aqp 2.0.
# S4 method for SoilProfileCollection
dice(
x,
fm = NULL,
SPC = TRUE,
pctMissing = FALSE,
fill = FALSE,
strict = TRUE,
byhz = TRUE,
verbose = FALSE
)
a SoilProfileCollection
object, or data.frame
when SPC = FALSE
a SoilProfileCollection
object
optional formula
describing top depths and horizon level attributes to include: integer.vector ~ var1 + var2 + var3
or integer.vector ~ .
to include all horizon level attributes. Specification of integer.vector
forces fill = TRUE
. When NULL
profiles are "diced" to depth and results will include all horizon level attributes. Note on interpretation of integer.vector
(slice tops)
return the diced SoilPrfolileCollection
, if FALSE
a data.frame
of horizon-level attributes
compute "percent missing data" by slice (when TRUE
expect 6-8x longer run time)
logical, fill with empty placeholder horizons in gaps within profiles, and/or, above/below interval specified in fm
. Automatically set to TRUE
when LHS of fm
is specified. Backwards compatibility with slice
is maintained by setting fill = TRUE
with or without fm
.
perform horizon depth logic checking / flagging / removal
Evaluate horizon depth logic at the horizon level (TRUE
) or profile level (FALSE
). Invalid depth logic invokes HzDepthLogicSubset
which removes offending profiles or horizon records.
Print information about object size/memory usage. Default: FALSE
D.E. Beaudette and A.G. Brown
For large and potentially messy collections that may include missing horizon depth logic errors, consider using repairMissingHzDepths()
before dice()
. Consider using accumulateDepths()
before invoking dice()
on collections that may contain old-style O horizon notation (e.g. 5-0cm).
repairMissingHzDepths()
, accumulateDepths()
, fillHzGaps()