Skip to contents

Trims surrounding whitespace and splits on spaces and hyphens so that compound or hyphenated surnames produced by imperfect name parsing (e.g. "DREW-MCLANE", "ANDREWS MCLANE") can be compared token-by-token rather than as opaque strings.

Usage

preprocess_name(name)

Arguments

name

A single character string.

Value

A character vector of upper-cased tokens (empty tokens dropped).

Examples

preprocess_name("Andrews-McLane")
#> [1] "ANDREWS" "MCLANE"