mgrep | R Documentation |
Search for multiple regex patterns in a given vector
mgrep(p, x, value = F, ic = F, v = F, unique = F)
p |
Character vector of regex patterns to search |
x |
Target vector to search for patterns |
value |
Boolean indicating if the value of matching patterns should be returned. If FALSE, only the index of matching patterns will be returned. Default is FALSE. |
ic |
Boolean indicating if case should be ignored. Default is FALSE. |
v |
Boolean indicating if the returned values should be inverted. Default is FALSE. |
unique |
Boolean indicating if duplicate values should be removed before returning. Default is FALSE. |
Vector of indices of x that contain matching patterns of p. If value = TRUE, values of x containing p will be returned.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.