clearText: Clean strings from any non-ASCII characters, extra spaces...

Description Usage Arguments

View source: R/my_funs.R

Description

Clean strings from any non-ASCII characters, extra spaces etc.

Usage

1
2
3
clearText(x, ascii = TRUE, encoding = "", lowercase = TRUE,
  trim = c("both", "left", "right", "none"), single_space = TRUE,
  alphanum = FALSE, other_char = " ")

Arguments

x

a character vector

ascii

if TRUE then string is converted to ASCII using iconv

encoding

encoding parameter passed to iconv, if encoding = "" is used, then iconv uses the default system encoding

lowercase

if TRUE characters are transformed to lowercase

trim

parameter passed to trimws, if trim = "none" then white spaces are not trimmed

single_space

if TRUE duplicated spaces are removed

alphanum

if TRUE non alphanumeric characters are replaced with value provided in other_char

other_char

replacement value for non alphanumeric characters, space by default


twolodzko/twextras documentation built on May 3, 2019, 1:52 p.m.