This function standardizes NFL team abbreviations to nflverse defaults. This helps for joins and plotting, especially with the new nflplotR package!
clean_team_abbrs(abbr, current_location = TRUE, keep_non_matches = TRUE)
a character vector of abbreviations
A character vector with the length of
abbr and cleaned team abbreviations
if they are included in
(depending on the value of
current_location). Non matches may be replaced
NA (depending on the value of
x <- c("PIE", "LAR", "PIT", "CRD", "OAK", "SL") # use current location and keep non matches clean_team_abbrs(x) # keep old location and replace non matches clean_team_abbrs(x, current_location = FALSE, keep_non_matches = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.