get_word_count: Counts the number of words per row in the column of a...

View source: R/surname_utils.R

get_word_countR Documentation

Counts the number of words per row in the column of a dataframe.

Description

A "word" is defined as a string of alphabetical characters separated by either spaces or dashes (but not other special characters).

Usage

get_word_count(voter_file, surname_col = "last_name", regex = "[ -]+")

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 querying the the word count.

Value

A vector of word counts.


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