ezGrepl: Matches patterns and returns a logical vector

View source: R/util.R

ezGreplR Documentation

Matches patterns and returns a logical vector

Description

Searches for entries in x that match patterns.

Usage

ezGrepl(patterns, x, combine = "or", ...)

Arguments

patterns

A value, vector or list to match the provided values with.

x

the values to match.

combine

whether just one value or all from patterns need to match to return TRUE:

  • "or" only one value from patterns needs to match.

  • "and" all values from patterns need to match.

...

additional arguments to be passed to grepl().

Value

Returns a logical vector containing the results of the tested pattern.

Author(s)

Rehrauer, Hubert

Schmid, Peter

See Also

grepl

Examples

ezGrepl(3,1:40)
ezGrepl(c(2,4),1:100)
ezGrepl(c(2,4),1:100,combine="and")

uzh/ezRun documentation built on Dec. 26, 2024, 9:53 a.m.