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

L1_profiles

Create Representative Soil Profiles via L1 Estimator


Description

The L1 estimator, or geometric median, is a multivariate generalization of the (univariate) median concept. This function performs a multivariate aggregation (via L1 estimator) according to a suite of ratio-scale soil properties. The L1 estimator is applied to soil profile data that have been sliced to a 1-depth-unit basis.

See the L1 Profiles Tutorial for additional examples.

Usage

L1_profiles(
  x,
  fm,
  basis = 1,
  method = c("regex", "simple", "constant"),
  maxDepthRule = c("max", "min"),
  maxDepthConstant = NULL,
  strict = FALSE
)

Arguments

x

SoilProfileCollection object

fm

formula, for example: group ~ p1 + p2 + p3, where "group" is a site-level grouping variable, and "p1", "p2", and "p3" are horizon level variables

basis

positive integer, aggregation basis (e.g. 1 for 1-depth-unit intervals). Values other than 1 are not currently supported.

method

soil depth evaluation method: "regex" for regular expression, "simple", or "constant". See details.

maxDepthRule

maximum depth rule: "max" or "min" See details.

maxDepthConstant

positive integer, maximum depth when maxDepthRule = 'constant'

strict

passed to slice

Details

See this related tutorial for additional examples. The method, maxDepthRule, and maxDepthConstant arguments set the maximum depth (over the entire collection) of analysis used to build "L1 profiles". The following rules are available:

  • method = 'regex' uses pattern matching on horizon designations (note that hzdesgnname metadata must be set with hzdesgnname(x) <- 'columnname')

  • method = 'simple' uses min or max as applied to x, no accounting for non-soil horizons (e.g. Cr or R)

  • method = 'constant' uses a fixed depth value supplied by maxDepthConstant

The maxDepthRule argument sets depth calculation constraint, applied to soil depths computed according to method (min or max).

Value

a SoilProfileCollection object

Note

This function requires the Gmedian package.

References

Cardot, H., Cenac, P. and Zitt, P-A. (2013). Efficient and fast estimation of the geometric median in Hilbert spaces with an averaged stochastic gradient algorithm. Bernoulli, 19, 18-43.


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.