find_player_name_remapping: Attempt to build a player name remapping table

View source: R/cleaning_names.R

find_player_name_remappingR Documentation

Attempt to build a player name remapping table

Description

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.

Usage

find_player_name_remapping(x, distance_threshold = 3, verbose = TRUE)

Arguments

x

datavolley: a datavolley object as returned by dv_read, or list of such objects

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

Value

data.frame with columns team, from, to

See Also

remap_player_names, check_player_names

Examples

## Not run: 
  x <- dv_read(dv_example_file(), insert_technical_timeouts = FALSE)
  remap <- find_player_name_remapping(x)

## End(Not run)

raymondben/datavolley documentation built on Jan. 28, 2025, 4:12 a.m.