Learn R Programming

aqp (version 2.1.0)

grepSPC: Subset SPC with pattern-matching for text-based attributes

Description

grepSPC() is a shorthand function for subsetting SoilProfileCollection objects. For example, by filter(grepl(spc, ...)) or filter(stringr::str_detect(spc, ...)). It provides pattern matching for a single text-based site or horizon level attribute.

Usage

grepSPC(object, attr, pattern, ...)

Value

A SoilProfileCollection.

Arguments

object

A SoilProfileCollection

attr

A character vector (column in object) for matching patterns against.

pattern

REGEX pattern to match in attr

...

Additional arguments are passed to grep()

Author

Andrew G. Brown.