Description Usage Arguments Value Examples

Multiple search pattern searches

1 2 3 | ```
multi_grepl(x, patterns, ..., simplify = TRUE)
multi_grep(x, patterns, ..., simplify = TRUE)
``` |

`x` |
a character vector where matches are sought, or an
object which can be coerced by |

`patterns` |
A list or vector of patterns to search across |

`...` |
Additional arguments passed to |

`simplify` |
if |

The name or position of the pattern that is matched

1 2 3 4 5 6 7 | ```
x <- c("apple", "banana", "lemon")
multi_grepl(x, c("a" = "^[ab]", "b" = "lem"))
multi_grepl(x, c("a" = "^[ab]", "b" = "q")) # lemon not matches on either
multi_grepl(x, c("a" = "^[ab]", "b" = "e")) # apple matches "a" before "b"
multi_grepl(x, c("a" = "^[ab]", "b" = "e"), simplify = FALSE) # shows all matches
multi_grepl(x, c("^[ab]", "e")) # returned as positions
multi_grepl(x, c("^[ab]", "e"), simplify = FALSE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.