Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dice

Efficient Slicing of SoilProfileCollection Objects


Description

Cut ("dice") soil horizons into 1-unit thick slices. This function replaces slice.

Usage

dice(
  x,
  fm = NULL,
  SPC = TRUE,
  pctMissing = FALSE,
  fill = FALSE,
  strict = TRUE,
  byhz = FALSE
)

Arguments

x

a SoilProfileCollection object

fm

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. When NULL profiles are "diced" to depth and results will include all horizon level attributes.

SPC

return the diced SoilPrfolileCollection, if FALSE a data.frame of horizon-level attributes

pctMissing

compute "percent missing data" by slice (when TRUE expect 6-8x longer run time)

fill

logical, fill with empty placeholder horizons in gaps within profiles, and/or, above/below interval specified in fm. Automatically set to TRUE when fm is specified. Backwards compatibility with slice is maintained by setting fill = TRUE with or without fm.

strict

perform horizon depth logic checking / flagging / removal

byhz

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.

Value

a SoilProfileCollection object, or data.frame when SPC = FALSE

Author(s)

D.E. Beaudette, A.G. Brown


aqp

Algorithms for Quantitative Pedology

v1.29
GPL (>= 3)
Authors
Dylan Beaudette [aut, cre], Pierre Roudier [aut, ctb], Andrew Brown [aut, ctb]
Initial release
2021-04-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.