• remove leading and trailing whitespace

  • change all characters to their lowercase representation

  • remove all punctuation and numbers

  • transforming all special characters (ä, ß, ...) to 1) de-ASCII and 2) Latin-ASCII (see stri_trans_list())

clean_string(data, col)

Arguments

data

dataframe

col

string; column name to clean

Examples

df <- data.frame(name = "Fritz Müller-Scherz 2")
clean_string(df, "name")
#>                  name
#> 1 fritz muellerscherz