Learn R Programming

toRvik (version 1.1.1)

bart_player_season: Get Player Season Stats

Description

Returns detailed, season-long player statistics on a variety of splits.

Usage

bart_player_season(
  year = current_season(),
  id = NULL,
  team = NULL,
  stat = NULL,
  load_all = FALSE,
  ...
)

Value

Returns a tibble with the number of columns dependent on the value supplied to the `stat` argument.

Arguments

year

Defaults to current season (YYYY).

id

Filters to player ID

team

Filters to team

stat

Stat to return ('advanced', 'box', 'shooting')

load_all

Load all available data (boolean); defaults to FALSE.

...

Acceptable parameters for API. Used for function development

Details

Data is split on three statistical types, explained below:

box

Returns basic box score stats; sorts by ppg.

shooting

Returns play-by-play shooting splits; sorts by ppg.

advanced

Returns advanced metrics and possession-adjusted box score statistics; sorts by recruiting rank.

all

Used when `load_all` is TRUE to return all data

Examples

Run this code
try(bart_player_season(year=2019, stat='advanced'))

Run the code above in your browser using DataLab