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

get.increase.depths

Return the horizon top depths from a call to get.increase.matrix()


Description

get.increase.depths performs the conversion of the square matrix output of get.increase.matrix back to horizon top depth for where criteria were met.

Usage

get.increase.depths(p, attr, threshold.fun, vertical.distance)

Arguments

p

a SoilProfileCollection, containing a single profile

attr

horizon attribute name to get the "increase" of

threshold.fun

a function that returns the threshold (as a function of attr); may return a constant single value

vertical.distance

the vertical distance (determined from difference SPC top depth variable) within which increase must be met

Details

Note that the threshold.fun result is allowed to contain NA, but that will result in no output for affected cells.

Value

Returns a numeric vector of depths where the increase requirement is met. For the argillic, the first is the one of interest.

get.increase.depths converts to horizon dop depth by using above matrix output to determine depths where increase is met.

Author(s)

Andrew Gene Brown

See Also

getArgillicBounds, crit.clay.argillic

Examples

data(sp1, package = 'aqp')
depths(sp1) <- id ~ top + bottom
site(sp1) <- ~ group

p <- sp1[1]
attr <- 'prop' # clay contents
foo <- get.increase.depths(p, threshold.fun = crit.clay.argillic,
                           attr = attr, vertical.distance = 30)
foo

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.