Learn R Programming

aqp (version 1.25)

checkHzDepthLogic: Check a SoilProfileCollection object for errors in horizon depths.

Description

This function inspects a SoilProfileCollection object, looking for 4 common errors in horizon depths: 1) bottom depths shallower than top depths, 2) equal top and bottom depths, 3) missing top or bottom depths (e.g. NA), and, 4) gaps or overlap between adjacent horizons.

Usage

checkHzDepthLogic(x)

Arguments

x

a SoilProfileCollection object

Value

A data.frame with as many rows as profiles in x.

id

Profile IDs, named according to idname(x)

depthLogic

boolean, errors related to depth logic

sameDepth

boolean, errors related to same top/bottom depths

missingDepth

boolean, NA in top / bottom depths

overlapOrGap

boolean, gaps or overlap in adjacent horizons

valid

boolean, profile passes all tests

Details

This function replaces test_hz_logic, now marked as deprecated.

Examples

Run this code
# NOT RUN {
## sample data
data(sp3)
depths(sp3) <- id ~ top + bottom
 
# these data should be clean
(res <- checkHzDepthLogic(sp3))

# }

Run the code above in your browser using DataLab