contains_one_of_: Check if a value matches multiple regular expressions

View source: R/comparisons.R

contains_one_of_R Documentation

Check if a value matches multiple regular expressions

Description

Check if a value matches multiple regular expressions

Usage

contains_one_of_(x, regexps, ignore.case = FALSE)

Arguments

x

A character vector

regexps

A vector of regular expressions

ignore.case

A logical. If FALSE (default) case is ignored in the comparison

Details

The vector x is checked against each regular expression in the array provided. Any match results in TRUE for the element

Value

A logical vector of length x

Examples

nams=c("George Washington", "Washington DC", "King George")
contains_one_of_(nams, c("Washington","DC"))

qPharmetra/PMDatR documentation built on April 7, 2024, 5:42 p.m.