Applies some name-cleaning heuristics to facilitate joins. May eventually refer to a name-cleaning database, for now will just include basic regex.

dp_cleannames(player_name, lowercase = FALSE)

Arguments

player_name

a character (or character vector)

lowercase

defaults to FALSE - if TRUE, converts to lowercase

Value

a character vector of cleaned names

Examples

# \donttest{ dp_cleannames(c("A.J. Green", "Odell Beckham Jr.", "Le'Veon Bell Sr."))
#> [1] "AJ Green" "Odell Beckham" "LeVeon Bell"
# }