R/add_team_long.R

Defines functions add_team_long

Documented in add_team_long

#' Add a column containing long team names to a dataframe with a `team` column
#'
#' @param df A dataframe containing a column called `team` with short
#' (two-character) team names, as in `arcfooty::team_names`
#'
#'
#' @importFrom dplyr select right_join %>%
#' @name add_team_long
#' @export

add_team_long <- function(df) {

  team <- NULL
  team_long <- NULL

  arcfooty::team_names %>%
    select(team, team_long) %>%
    right_join(df, by = "team")

}
MattCowgill/thearcfooty documentation built on Jan. 19, 2020, 1:57 p.m.