A team 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. If a team name matches the from entry and/or its ID matches the team_id entry in a row in remap, the team will be renamed to the corresponding to value and/or its ID changed to the corresponding to_team_id value.
Arguments
- x
datavolley: a datavolley object as returned by
dv_read, or list of such objects- remap
data.frame: data.frame of strings with one or both columns
fromandteam_id, and one or both columnstoandto_team_id- fixed
logical: treat the
fromandteam_identries as fixed strings? IffixedisFALSEthey will be treated as regular expressions
Examples
if (FALSE) { # \dontrun{
x <- dv_read(dv_example_file(), insert_technical_timeouts = FALSE)
summary(x)
## rename a team based just on team name
summary(remap_team_names(x, data.frame(from="Nova KBM Branik", to="NKBM Branik")))
## rename a team based on team name and ID
summary(remap_team_names(x, data.frame(from="Nova KBM Branik", to="NKBM Branik", team_id="MB4")))
} # }
