Learn R Programming

aqp (version 1.0)

SoilProfileCollection-class: SoilProfileCollection Class

Description

Basic class for storing soil profile collections, associated site data, and metadata.

Arguments

Objects from the Class

Objects can be created by calls of the form new("SoilProfileCollection", ...).

Examples

Run this code
## 1. test validity methods

# this should work fine
data(sp1)
depths(sp1) <- id ~ top + bottom

# horizon logic can be tested via data.frame and 
# test_hz_logic(i, topcol, bottomcol, test.NA=TRUE, strict=FALSE)

# these next examples should throw an error
# insert a missing horizon boundary
data(sp1)
sp1$top[1] <- NA
depths(sp1) <- id ~ top + bottom

# insert a bogus horizon boundary
## NOTE: this is currently valid, as this check breaks slice(SPC, ...)
data(sp1)
sp1$top[2] <- 30
depths(sp1) <- id ~ top + bottom

Run the code above in your browser using DataLab