mgrep: grep for multiple patterns

View source: R/Utilities.R

mgrepR Documentation

grep for multiple patterns

Description

Search for multiple regex patterns in a given vector

Usage

mgrep(p, x, value = F, ic = F, v = F, unique = F)

Arguments

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.

Value

Vector of indices of x that contain matching patterns of p. If value = TRUE, values of x containing p will be returned.


kevincjnixon/BinfTools documentation built on July 10, 2024, 11:46 a.m.