Returns a unique list of special characters found in a column of a dataframe. By default, these characters consist of any that are not upper- or lower-case letters. This preference can be overwritten by providing a new regular expression.
get_unique_special_characters(
voter_file,
surname_col = "last_name",
regex = "[A-Za-z]"
)
A vector of unique special characters found in the names.
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 identifying non-special characters (by default, alphabetic characters).