vgsub: Vectorised String Replacement

View source: R/utils.R

vgsubR Documentation

Vectorised String Replacement

Description

A simple wrapper for gsub that replaces all patterns from pattern argument with ones in replacement over vector provided in argument x.

Usage

vgsub(pattern, replacement, x, ...)

Arguments

pattern

see eponymous argument for gsub function

replacement

see eponymous argument for gsub function

x

see eponymous argument for gsub function

...

additional arguments for gsub function

Value

a character vector with string replacements

References

See original thread for more details https://stackoverflow.com/a/6954308/564164. Special thanks to user Jean-Robert for this one!


rapportools documentation built on March 22, 2022, 1:06 a.m.