Learn R Programming

eiCompare (version 3.0.4)

get_word_count: 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 = "[ -]+")

Value

A vector of word counts.

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.