View source: R/cleaning_names.R
find_player_name_remapping | R Documentation |
A player name can sometimes be spelled incorrectly, particularly if there are character encoding issues. This can be a particular problem when combining data from multiple files. This function will attempt to find names that have been misspelled and create a remapping table suitable to pass to remap_player_names
. Player names will only be compared within the same team. Note that this function is unlikely to get perfect results: use its output with care.
find_player_name_remapping(x, distance_threshold = 3, verbose = TRUE)
x |
datavolley: a datavolley object as returned by |
distance_threshold |
numeric: if two names differ by an amount less than this threshold, they will be treated as the same name |
verbose |
logical: print progress to console as we go? Note that warnings will also be issued regardless of this setting |
data.frame with columns team, from, to
remap_player_names
, check_player_names
## Not run:
x <- dv_read(dv_example_file(), insert_technical_timeouts = FALSE)
remap <- find_player_name_remapping(x)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.