Learn R Programming

wrMisc (version 1.15.3.1)

.replSpecChar: Replace Special Characters

Description

This function allows replacing special characters Note that (most) special characters must be presented with protection for grep and sub.

Usage

.replSpecChar(x, findSp = c("\\(", "\\)", "\\$"), replBy = "_")

Value

This function returns a corrceted/adjusted factor

Arguments

x

(character) main input

findSp

(character) special characters to replace (may have to be given as protected)

replBy

(character) replace by

See Also

Examples

Run this code
.replSpecChar(c("jhjh(ab)","abc"))

Run the code above in your browser using DataLab