mgsub {bazar}R Documentation

Multiple gsub

Description

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

Usage

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

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


[Package bazar version 1.0.11 Index]