Learn R Programming

nbastatR (version 0.1.12031)

synergy: Get Synergy data for specified season

Description

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

Usage

synergy(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, return_wide = 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

return_wide

if return_wide returns a spread tibble

return_message

Value

a tibble

Examples

Run this code
# NOT RUN {
synergy(seasons = 2019, 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, return_wide = F, return_message = TRUE)
# }

Run the code above in your browser using DataLab