Learn R Programming

aqp (version 1.25)

hzDistinctnessCodeToOffset: Convert Horizon Boundary Distinctness to Vertical Offset

Description

This function will convert USDA-NCSS horizon boundary distinctness codes into vertical (+/-) offsets in cm, based on the Field Book for Describing and Sampling Soils, version 3.0.

Usage

hzDistinctnessCodeToOffset(
  x,
  codes = c("V", "A", "C", "G", "D"),
  offset = c(0.5, 2, 5, 15, 20)/2
)

Arguments

x

vector of boundary distinctness codes to be converted

codes

code values, adjust as needed

offset

vertical offset factors (cm), approximating 1/2 of the transitional zone thickness, see details

Value

vector of offsets with same length as x

Details

The default offests are based on the high-end of ranges presented in "transitional zone thickness criteria" from the Field Book version 3.0 (page 2-6). Offsets are returned as 1/2 of the transitional zone thickness so that horizon boundaries can be adjusted up/down from horizon depths. See plotSPC, specifically the hz.distinctness.offset argument for vizualization ideas. Missing data in x (NA) or codes that are not defined in codes are returned as 0 offsets.

References

Field Book for Describing and Sampling Soils, version 3.0

See Also

plotSPC

Examples

Run this code
# NOT RUN {
data(sp1)
hzDistinctnessCodeToOffset(sp1$bound_distinct)

# }

Run the code above in your browser using DataLab