View source: R/cleaning_names.R
remap_team_names | R Documentation |
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.
remap_team_names(x, remap, fixed = TRUE)
x |
datavolley: a datavolley object as returned by |
remap |
data.frame: data.frame of strings with one or both columns |
fixed |
logical: treat the |
datavolley object or list with corresponding team names changed
dv_read
## Not run:
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")))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.