subSpecials: Sub special characters out of character vectors.

View source: R/subspecials.r

subSpecialsR Documentation

Sub special characters out of character vectors.

Description

Converts each of the special characters to their escaped equivalents in each element of each vector.

Usage

subSpecials(..., specialChars = c("!", "(", ")", "-", "=", "*", "."))

Arguments

...

Character vectors that will be altered by subbing the special characters with their escaped equivalents

specialChars

The characters to be subbed out

Details

Each element in the specialChar vector is subbed for its escaped equivalent in each of the elements of each vector passed in

Value

The provided vectors are returned with any of the defined specialChars subbed out for their escaped equivalents. Each vector is returned as an element of a list.

Author(s)

Jared P. Lander www.jaredlander.com

See Also

sub subOut

Examples


subSpecials(c("Hello", "(parens)", "Excited! Mark"))
subSpecials(c("Hello", "(parens)", "Excited! Mark"), specialChars=c("!", "("))
subSpecials(c("Hello", "(parens)", "Excited! Mark"), 
 c("This is a period. And this is an asterisk *"), specialChars=c("!", "("))
subSpecials(c("Hello", "(parens)", "Excited! Mark"), 
 c("This is a period. And this is an asterisk *"), specialChars=c("!", "(", "*"))


useful documentation built on Oct. 24, 2023, 9:07 a.m.