Applies some name-cleaning heuristics to facilitate joins. These heuristics may include:
removing periods and apostrophes
removing common suffixes, such as Jr, Sr, II, III, IV
converting to lowercase
ffscrapr::dp_name_mapping to do common name substitutions, such as Mitch Trubisky to Mitchell Trubisky
clean_player_names( player_name, lowercase = FALSE, convert_lastfirst = TRUE, use_name_database = TRUE )
a character vector of player names
defaults to FALSE - if TRUE, converts to lowercase
defaults to TRUE - converts names from "Last, First" to "First Last"
uses internal name database to do common substitutions (Mitchell Trubisky to Mitch Trubisky etc)
a character vector of cleaned names
Equivalent to the operation done by
ffscrapr::dp_clean_names() and uses the same player name database.
clean_player_names(c("A.J. Green", "Odell Beckham Jr.", "Le'Veon Bell Sr."))#>  "AJ Green" "Odell Beckham" "LeVeon Bell"clean_player_names(c("Trubisky, Mitch", "Atwell, Chatarius", "Elliott, Zeke", "Elijah Moore"), convert_lastfirst = TRUE)#>  "Mitchell Trubisky" "Tutu Atwell" "Ezekiel Elliott" #>  "Elijah Moore"