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