nba_team_stats: Generate summary stats for NBA players

Description Usage Arguments Value Examples

View source: R/nba_team_stats.R

Description

The function provides descriptive (mean, median, 25 statistic of interest (3PA, 3PM, etc) along with teams of interest (GS, HOU, etc). If positions of interest (C, PG, etc) are specified, the returned tibble depicts relevant descriptive statistics for the relevant positions in the relevant teams.

Usage

1
2
3
4
5
6
nba_team_stats(
  nba_data,
  stats_filter = c(),
  teams_filter = c(),
  positions_filter = c()
)

Arguments

nba_data

tibble of scraped ESPN NBA data

stats_filter

character vector

teams_filter

character vector

positions_filter

character vector

Value

A tibble

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
nba_data = read_csv(
"https://raw.githubusercontent.com/kfoofw/nba_espn/master/0.data/NBA_reg_2018-2019.csv"
)
# Find descriptive stats for all teams without position
nba_team_stats(nba_data)

# Find specific stats (3PM, 3PA) for specific teams (GS, HOU) for specific positions (PG, C)
nba_team_stats(nba_data, stats_filter = c("3PM","3PA"), teams_filter = c("GSW","HOU"), positions_filter = c("C","PG"))

# Find specific stats (3PM, 3PA) for specific teams (GS, HOU) without positions_filter inputs
nba_team_stats(nba_data, stats_filter = c("3PM","3PA"), teams_filter = c("GS","HOU"))

# Find specific stats (3PM, 3PA) for all teams (unspecified) for specific positions (PG, C)
nba_team_stats(nba_data, stats_filter = c("3PM","3PA"), positions_filter = c("C","PG"))

kfoofw/test_githubactions documentation built on March 14, 2020, 12:05 a.m.