subset-SoilProfileCollection-method: Subset a SoilProfileCollection with logical expressions

subset,SoilProfileCollection-methodR Documentation

Subset a SoilProfileCollection with logical expressions

Description

subset() is a function used for extracting profiles from a SoilProfileCollection based on logical criteria. It allows the user to specify an arbitrary number of logical vectors (equal in length to site or horizon), separated by commas. The function includes some support for non-standard evaluation.

Usage

## S4 method for signature 'SoilProfileCollection'
subset(x, ..., greedy = FALSE)

Arguments

x

A SoilProfileCollection

...

Comma-separated set of R expressions that evaluate as TRUE or FALSE. Length for individual expressions matches number of sites OR number of horizons, in object.

greedy

Use "greedy" matching for combination of site and horizon level matches? greedy = TRUE is the union, whereas greedy = FALSE (default) is the intersection (of site and horizon matches).

Details

To minimize likelihood of issues with non-standard evaluation context, especially when using subset() inside another function, all expressions used in ... should be in terms of variables that are in the site or horizon data frame.

Value

A SoilProfileCollection.

Author(s)

Andrew G. Brown.


aqp documentation built on Sept. 8, 2023, 5:45 p.m.