mgsub: Multiple gsub

Description Usage Arguments Value Author(s) See Also Examples

Description

The function mgsub is a ‘multiple’ version of gsub.

Usage

1
mgsub(pattern, replacement, x, ...)

Arguments

pattern

character vector containing regular expressions to be matched in the given character vector.

replacement

a replacement vector of the same length as pattern for matched pattern. Coerced to character if possible.

x

vector or NULL: the values to be matched against.

...

additional parameters to be passed to gsub.

Value

A character vector of the same length as x.

Author(s)

Theodore Lytras on StackOverflow, see http://stackoverflow.com/a/15254254/3902976

See Also

gsub from package base.

Examples

1
mgsub(c("aa", "AA"), c("bb", "BB"), c("XXaaccAACC", "YYaaccAACC", "ZZaaccAACC"))

bazar documentation built on May 2, 2019, 7:02 a.m.