subOut: Sub special characters out of a character vector.

View source: R/subspecials.r

subOutR Documentation

Sub special characters out of a character vector.

Description

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

Usage

subOut(toAlter, specialChars = c("!", "(", ")", "-", "=", "*", "."))

Arguments

toAlter

Character vector 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 toAlter

Value

toAlter is returned with any of the defined specialChars subbed out for their escaped equivalents

Author(s)

Jared P. Lander www.jaredlander.com

See Also

sub subSpecials

Examples


subOut(c("Hello", "(parens)", "Excited! Mark"))
subOut(c("Hello", "(parens)", "Excited! Mark"), specialChars=c("!", "("))


jaredlander/useful documentation built on Nov. 4, 2023, 10:56 a.m.