A multi-barreled surname is one containing a dash or a space. This function finds all multi-barreled surnames in a voter file.
get_multi_barreled_surnames(
voter_file,
surname_col = "last_name",
regex = "[ -]+"
)
A dataframe of voters whose surnames are multi-barreled.
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.