Learn R Programming

soilDB (version 2.5)

simplifyFragmentData: Simplify Coarse Fraction Data

Description

Simplify multiple coarse fraction (>2mm) records by horizon.

Usage

simplifyFragmentData(rf, id.var, nullFragsAreZero = TRUE)

Arguments

rf

a data.frame object, typically returned from NASIS, see details

id.var

character vector with the name of the column containing an ID that is unique among all horizons in rf

nullFragsAreZero

should fragment volumes of NULL be interpreted as 0? (default: TRUE), see details

Details

This function is mainly intended for the processing of NASIS pedon/horizon data which contains multiple coarse fragment descriptions per horizon. simplifyFragmentData will "sieve out" coarse fragments into the USDA classes, split into hard and para- fragments.

The simplifyFragmentData function can be applied to data sources other than NASIS by careful use of the id.var argument. However, rf must contain coarse fragment volumes in the column "fragvol", fragment size (mm) in columns "fragsize_l", "fragsize_r", "fragsize_h", and fragment cementation class in "fraghard".

There are examples in the KSSL data tutorial.