Description Usage Arguments Value Examples
Takes in a list of regex patterns and returns true if any pattern matches.
1 |
x |
A vector of strings to search. |
pattern |
A vector of regex patterns. |
A vector of the same length as x
, TRUE if any pattern matches.
1 2 3 4 5 6 7 8 9 | x <- fastReadLines("http://textfiles.com/ufo/ufobooks.ufo", newlinechar="\r\n", 1e5)
head(x[mgrepl(c("ALIENS", "UFO"), x)])
[1] " UFOLOGY BOOKS (REVISION 2.1 343 books)"
[2] " H. S. Stewart on the subject of UFO's. The list is alphabetic"
[3] " Tom Mickus's most excellent board UFONET I. (416-237-1204)"
[4] " Bill Adler * LETTERS TO THE AIR FORCE ON UFOS 1967"
[5] " Gordon W. Allen OVERLORDS OLYMPIANS AND THE UFO 1974"
[6] " Robert B. Beard FLYING SAUCERS, UFO'S AND EXTRA"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.