Given a voter file and a column, returns a voter file with special characters stripped stripped from that column.
strip_special_characters(
voter_file,
surname_col = "last_name",
regex = "[^A-Za-z]+",
replace = " "
)
A dataframe of voters whose surname column is stripped of special characters.
The voter file, with each row consisting of a voter.
A string denoting the surname column.
A string denoting the regular expression to use for denoting the the special characters.
The replacement string for special characters.