parse_names: Parse Human Names

Description Usage Arguments Value Examples

Description

human names are complex things; sometimes people have honorifics, or not. Or a single middle name, or many. Or a compound surname, or not a compound surname but 'PhD' at the end of their name, and augh.

parse_names provides a simple function for taking consistently formatted human names and splitting them into salutation, first_name, middle_name, last_name and suffix. It is capable of dealing with compound surnames, multiple middle names, and similar variations, and is fully vectorised.

Usage

1

Arguments

names

a character vector of names to parse.

Value

a data.frame with the columns salutation, first_name, middle_name, last_name, suffix and full_name (which contains the original name). In the event that a name doesn't have a salutation, middle name, suffix, or so on, an NA will appear.

Examples

1
2
3
4
5
# Parse a simple name
parse_names("Oliver Keyes")

# Parse a more complex name
parse_names("Hon. Oliver Timothy Keyes Esq.")


Search within the humaniformat package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.