clean_team_abbrs {mlbplotR} | R Documentation |
Standardize MLB Team Abbreviations
Description
This function standardizes MLB team abbreviations to Baseball Savant defaults. This helps for joins and plotting
Usage
clean_team_abbrs(abbr, keep_non_matches = TRUE)
Arguments
abbr |
a character vector of abbreviations |
keep_non_matches |
will non-matches be kept in the vector? |
Value
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
).
Examples
x <- c("PIE", "STL", "WSN", "CWS", "CHW")
# use current location and keep non matches
clean_team_abbrs(x)
[Package mlbplotR version 1.1.0 Index]