getSoilDepthClass: Generate Soil Depth Class Matrix

View source: R/getSoilDepthClass.R

getSoilDepthClassR Documentation

Generate Soil Depth Class Matrix

Description

Generate a boolean matrix of soil depth classes, actual soil depth class, and estimate of soil depth from a SoilProfileCollection object. Soil depths are estimated using pattern matching applied to horizon designations, by estimateSoilDepth(). The default REGEX pattern (p = 'Cr|R|Cd') will match most "contacts" described using the USDA / Soil Taxonomy horizon designation conventions.

Usage

getSoilDepthClass(
  f,
  depth.classes = c(very.shallow = 25, shallow = 50, mod.deep = 100, deep = 150,
    very.deep = 10000),
  ...
)

Arguments

f

a SoilProfileCollection object

depth.classes

a named vector of classes and depth breaks

...

arguments passed to estimateSoilDepth

Value

a data.frame containing soil depth and depth class for each profile, see examples

Author(s)

D.E. Beaudette and J.M. Skovlin

See Also

estimateSoilDepth

Examples


data(sp1)
depths(sp1) <- id ~ top + bottom

# generate depth-class matrix
sdc <- getSoilDepthClass(sp1, name = 'name')

# inspect
head(sdc)

# join back into sp1 as site-level data
site(sp1) <- sdc

## Not run: 
# sample data
data(gopheridge, package='soilDB')

getSoilDepthClass(gopheridge, name = 'hzname')

## End(Not run)


aqp documentation built on Sept. 8, 2023, 5:45 p.m.