multiGrep {maDB}R Documentation

Perform a pattern search with a list of patterns

Description

multiGrep: search for a list of patterns.

Usage

multiGrep(pattern,x,...)

Arguments

pattern The string, or a vector of strings, that should be searched in the submitted data.
x The data, any kind of string or vector.
... Some additional parameters for the myGrep and grep commands that are executed inside the function.

Details

The functions performs a myGrep call for each of the patterns submitted and returns a vector with the indizes where the patterns where found inside the data vector.

Author(s)

Johannes Rainer

References

See Also

grep, myGrep

Examples

test <- c("where","is","the","pattern","in","this","vector","?")
multiGrep(pattern="patt",test)
test[multiGrep(pattern="patt",test)]

multiGrep(pattern=c("the","tor","is","where"),test)
test[multiGrep(pattern=c("the","tor","is","where"),test)]

[Package maDB version 1.10.0 Index]