Learn R Programming

aqp (version 1.31)

subsetHz,SoilProfileCollection-method: Subset the horizons in a SoilProfileCollection using logical criteria

Description

Subset the horizons in a SoilProfileCollection using logical criteria

Usage

# S4 method for SoilProfileCollection
subsetHz(x, ...)

Arguments

x

a SoilProfileCollection

...

Comma-separated set of R expressions that evaluate as TRUE or FALSE in context of horizon data frame. Length for individual expressions matches number of horizons, in x.

Value

a SoilProfileCollection with a subset of horizons, possibly with some sites removed

Examples

Run this code
# NOT RUN {
data(sp3)

depths(sp3) <- id ~ top + bottom

# show just horizons with 10YR hues
plot(subsetHz(sp3, hue == '10YR'))

# }

Run the code above in your browser using DataLab