Learn R Programming

Kmisc (version 0.2.0)

extract.re: Extract Variable from a Data Frame / List, with Regular Expressions

Description

Extract variables from a list / data.frame, whereby the variables matching pattern are returned.

Usage

extract.re(dat, pattern, value = TRUE, perl = TRUE, ...)

Arguments

dat
list or data.frame object, or other similar object with a names attribute
pattern
a regular expression pattern to match against names(dat)
value
boolean. passed to grep
perl
boolean. use perl-compatible regular expressions?
...
optional arguments passed to grep

See Also

grep, regex