mgrep: Search strings for multiple patterns

Description Usage Arguments See Also

View source: R/grep.R

Description

Search strings for multiple patterns

Usage

1
2
3
4
5
mgrep(patterns, x, ignore.case = FALSE, perl = FALSE, value = FALSE,
  fixed = FALSE, useBytes = FALSE, invert = FALSE, list = FALSE)

mgrepl(patterns, x, ignore.case = FALSE, perl = FALSE, fixed = FALSE,
  useBytes = FALSE, action = "list")

Arguments

patterns

character string containing a regular expression (or character string)

x

character vector

ignore.case

if FALSE, the pattern matching is case sensitive and if TRUE, case is ignored during matching

perl

logical. Should perl-compatible regexps be used?

value

if FALSE, a vector containing the (integer) indices of the matches determined by grep is returned, and if TRUE, a vector containing the matching elements themselves is returned

fixed

logical. If TRUE, pattern is a string to be matched as is. Overrides all conflicting arguments

useBytes

logical. If TRUE the matching is done byte-by-byte rather than character-by-character.

invert

logical. If TRUE return indices or values for elements that do not match.

list

if TRUE list all matches

action

function for aggregating matches, e.g. all, any, sum (count maches), mean (proportion of matching)

See Also

grep


twolodzko/twextras documentation built on May 3, 2019, 1:52 p.m.