Learn R Programming

eiCompare (version 3.0.4)

get_unique_special_characters: Gets special characters in a column of names.

Description

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.

Usage

get_unique_special_characters(
  voter_file,
  surname_col = "last_name",
  regex = "[A-Za-z]"
)

Value

A vector of unique special characters found in the names.

Arguments

voter_file

The voter file, with each row consisting of a voter.

surname_col

A string denoting the surname column.

regex

A string denoting the regular expression to use for identifying non-special characters (by default, alphabetic characters).