Learn R Programming

BAwiR (version 1.5)

do_possession_stats_lineup: Possessions-related statistics for lineups

Description

Compute the possessions-related statistics for lineups. These statistics are offensive rating, defensive rating, net rating, pace and number of possessions.

Usage

do_possession_stats_lineup(data_combs, team_name, type_lineup, type_period, type_opponent, 
                           cols_group = c("team", "lineup"))

Value

A data frame with the possessions statistics for each lineup.

Arguments

data_combs

Data frame with all the combinations of lineups.

team_name

Name of the team.

type_lineup

Type of lineups to analyze. Options are 'quintet', 'quartet', 'trio', 'duo' and 'single'.

type_period

Period of interest. Options are xC, where x starts from 1. Common periods are from 1 to 4. Overtimes are labeled with the next numbers, such as 5C for the first overtime and 6C for the second one. Nothing to do if NULL.

type_opponent

Name of the opponent teams. Nothing to do if NULL.

cols_group

Group of columns to apply the computations. Default is c("team", "lineup") to compute the metrics just for the players on court. To compute them for the players both on and off court, use c("team", "lineup", "status").

Author

Guillermo Vinue

Details

See https://www.basketball-reference.com/about/glossary.html for formulas and explanations.

See Also

do_possession_stats

Examples

Run this code
if (FALSE) {
do_possession_stats_lineup(acb_combs, "Unicaja", "quintet", NULL, NULL)
}

Run the code above in your browser using DataLab