R/team_function.R

Defines functions team_function

Documented in team_function

#' Function that will filter the tibble to only games played by a given team
#' 
#'
#' @param basketball_data the data frame we are using to do the manipulation
#' @param team_name the name of the team of whose games we want
#'
#' @export
#' 

team_function <- function(basketball_data, team_name) {
  basketball_data <- basketball_data %>% 
    filter(grepl(team_name,V2) | grepl(team_name,V4))
  return(basketball_data)
}
akhilbandhu/basketballpackage documentation built on April 21, 2022, 5:37 p.m.