get_unique_special_characters: Gets special characters in a column of names.

View source: R/surname_utils.R

get_unique_special_charactersR Documentation

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]"
)

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).

Value

A vector of unique special characters found in the names.


eiCompare documentation built on Aug. 31, 2023, 5:16 p.m.