Learn R Programming

nbastatR (version 0.1.11002)

get_teams_season_stat_splits: Get NBA Team data by split

Description

Get NBA Team data by split

Usage

get_teams_season_stat_splits(teams = NULL, team_ids = NULL, season = 2018,
  season_types = c("Regular Season"), measures = "Base",
  modes = c("PerGame"), is_plus_minus = F, is_pace_adjusted = F,
  periods = 0, is_rank = F, game_segments = NA, divisions_against = NA,
  conferences_against = NA, date_from = NA, date_to = NA,
  last_n_games = 0, locations = NA, months = 0, season_segments = NA,
  opponents = NA, outcomes = NA, playoff_rounds = 0,
  shot_clock_ranges = NA, return_message = TRUE,
  assign_to_environment = TRUE, add_mode_names = T)

Arguments

teams

vector of team names

team_ids

vector of team ids

season_types

vector of season types options include

  • Regular Season

  • Pre Season

  • Playoffs

  • All Star

measures

vector of measure types options include

  • Base

  • Advanced

  • Misc

  • Scoring

  • Four Factors

  • Opponent

  • Usage

modes

vector of modes options include

  • PerGame

  • Totals

  • MinutesPer

  • Per48

  • Per40

  • Per36

  • PerMinute

  • PerPossession

  • PerPlay

  • Per100Possessions

  • Per100Plays

is_plus_minus

is plus minus TRUE or FALSE

is_pace_adjusted

is pace adjusted TRUE or FALSE

periods

vector of periods 0:12

is_rank

is rank TRUE or FALSE

game_segments

vector of game segments options include

  • NA

  • First Half

  • Second Half

  • Overtime

divisions_against

vector of divisions against options include

  • NA

  • Atlantic

  • Central

  • Northwest

  • Pacific

  • Southeast

  • Southwest

conferences_against

vector of conferences against options include

  • NA

  • East

  • West

date_from

vector of dates from

date_to

vector of dates to

last_n_games

vector of last_n games 0:82

locations

vector of locations options include

  • NA

  • Home

  • Road

months

vector of game months options include 0:12

season_segments

vector of season segments, options include

  • NA

  • Post All-Star

  • Pre All-Star

opponents

vector of opponent names if NA all teams

outcomes

vector of outcomes options include

  • NA

  • Wins

  • Losses

playoff_rounds

vector of playoff rounds options include code0:4

shot_clock_ranges

vector of shot clock ranges options include

  • NA,

  • 24-22

  • 22-18 Very Early

  • 18-15 Early

  • 15-7 Average

  • 7-4 Late

  • 4-0 Very Late

  • ShotClock Off

return_message

if TRUE add mode nanmes

assign_to_environment

if TRUE assigns data to environment

add_mode_names

if TRUE adds data to environment

seasons

vector of the start years

Examples

Run this code
# NOT RUN {
get_teams_season_stat_splits(teams = c("Brooklyn Nets"), season = 2018, measures = c("Base", "Opponent"), modes = c("PerGame"), assign_to_environment = T, add_mode_names = T, return_message = TRUE)
# }

Run the code above in your browser using DataLab