powered by
This function allows replacing special characters Note that (most) special characters must be presented with protection for grep and sub.
grep
sub
.replSpecChar(x, findSp = c("\\(", "\\)", "\\$"), replBy = "_")
This function returns a corrceted/adjusted factor
(character) main input
(character) special characters to replace (may have to be given as protected)
(character) replace by
factor
.replSpecChar(c("jhjh(ab)","abc"))
Run the code above in your browser using DataLab