Learn R Programming

nbastatR (version 0.1.110202031)

get_synergy_categories_stats: Get Synergy data for specified season

Description

Get Synergy data for specified result type, category, season type and set

Usage

get_synergy_categories_stats(seasons = 2016:2018, result_types = c("player",
  "team"), season_types = c("Regular Season"), set_types = c("offensive",
  "defensive"), categories = c("Transition", "Isolation", "PRBallHandler",
  "PRRollman", "Postup", "Spotup", "Handoff", "Cut", "OffScreen", "OffRebound",
  "Misc"), results = 500, assign_to_environment = TRUE, spread_data = F,
  nest_data = F, return_message = TRUE)

Arguments

seasons

vector of seasons from 2016 onward

result_types

result type

  • team

  • player

season_types

type of season play

  • Playoffs

  • Regular Season

set_types

set type

  • offensive

  • defensive

categories

vector of synergy categories options include:

  • Transition

  • Isolation

  • PRBallHandler

  • PRRollman

  • Postup

  • Spotup

  • Handoff

  • Cut

  • OffScreen

  • OffRebound

  • Misc

results

number of results

assign_to_environment

if TRUE assigns table to environment

spread_data

if assign_to_environment returns a spread data_frame

return_message

Value

a data_frame

Examples

Run this code
# NOT RUN {
get_synergy_categories_stats(seasons = 2016:2018, result_types = c("player", "team"), season_types = c("Regular Season"), set_types = c("offensive", "defensive"), categories = c("Transition", "Isolation", "PRBallHandler", "PRRollman", "Postup",  "Spotup", "Handoff", "Cut", "OffScreen", "OffRebound", "Misc"), results = 500, assign_to_environment = TRUE, spread_data = F, return_message = TRUE)
# }

Run the code above in your browser using DataLab