clean_team_abbrs | R Documentation |
This function standardizes MLB team abbreviations to Baseball Savant defaults. This helps for joins and plotting
clean_team_abbrs(abbr, keep_non_matches = TRUE)
abbr |
a character vector of abbreviations |
keep_non_matches |
will non-matches be kept in the vector? |
A character vector with the length of abbr
and cleaned team abbreviations
if they are included in team_data
. Non matches may be replaced
with NA
(depending on the value of keep_non_matches
).
x <- c("PIE", "STL", "WSN", "CWS", "CHW")
# use current location and keep non matches
clean_team_abbrs(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.