clean.text {StabPerf} | R Documentation |
Removes all non-alphanumeric characters from a string/array of strings
Description
Replaces all characters that are not w (i.e. not A-Z or a-z or 0-9 with a replacement character/string
Usage
clean.text(..., rep="_") gsub("\W", rep, ...)
Arguments
... |
character. Passed to gsub |
rep |
character. Replacement string, default:_ |
Value
character |
Modified strings |
See Also
gsub
Examples
clean.text(rep="_BAD_", c("wow!", "*13junk1()_/"))
# Returns: c("wow_BAD_" "_BAD_13junk1_BAD__BAD___BAD_"
[Package
StabPerf version 0.5
Index]