Finds elements in vector or column-names in data.frame/matrix
Pattern matching in a vector or column names of a data.frame or matrix.
Grep(x, pattern, subset = TRUE, ignore.case = TRUE, ...)
x
: vector, matrix or data.frame.pattern
: regular expression to search forsubset
: If TRUE returns subset of data.frame/matrix otherwise just the matching column namesignore.case
: Default ignore case...
: Additional arguments to 'grep'A data.frame with 2 columns with the indices in the first and the matching names in the second.
data(iris) head(Grep(iris,"(len)|(sp)"))
grep
, and agrep
for approximate string matching,
Klaus K. Holst