dp_clean_names | R Documentation |
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
using ffscrapr::dp_name_mapping
to do common name substitutions, such as Mitch Trubisky to Mitchell Trubisky
dp_clean_names(...)
dp_cleannames(...)
... |
Arguments passed on to
|
Equivalent to the operation done by ffscrapr::dp_clean_names()
and uses the same player name database.
a character vector of cleaned names
nflreadr::clean_player_names()
dp_cleannames(c("A.J. Green", "Odell Beckham Jr.", "Le'Veon Bell Sr."))
dp_cleannames(c("Trubisky, Mitch", "Atwell, Chatarius", "Elliott, Zeke", "Elijah Moore"),
convert_lastfirst = TRUE,
use_name_database = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.