do_study_lineup: Compute lineups with their statistics

View source: R/do_study_lineup.R

do_study_lineupR Documentation

Compute lineups with their statistics

Description

This is an improvement of do_lineup to obtain all the information related to the lineups that a given team shows during a game.

Usage

do_study_lineup(data, day_num, game_code_num, team_sel, season = "2025-2026", verbose)

Arguments

data

Play-by-play prepared data from a given game.

day_num

Day number.

game_code_num

Game code.

team_sel

One of the teams involved in the game.

season

Season string.

verbose

Logical to indicate if the information of the computations must be provided.

Value

A list with four data frames:

data_lin: Statistics obtained by every lineup. data_pos: Start of each possession. data_usg: Possessions ended by each player. data_usg_act: Actions that ended each possession per player.

Note

A possession lasts 24 seconds in the ACB league.

Author(s)

Guillermo Vinue

See Also

do_lineup, do_possession, do_lineup_metrics, do_usage

Examples

## Not run: 
library(dplyr)
df0 <- acb_vbc_cz_pbp_2223

day_num <- unique(acb_vbc_cz_pbp_2223$day)
game_code <- unique(acb_vbc_cz_pbp_2223$game_code)

# Starting players:
acb_games_2223_sl <- acb_vbc_cz_sl_2223 %>%
  dplyr::filter(period == "1C")

# Prepare data:
df1 <- do_prepare_data(df0, day_num, 
                       acb_games_2223_sl, acb_games_2223_info,
                       game_code)

teams_game <- sort(unique(df1$team))

# Study the lineups:
data_res <- do_study_lineup(df1, day_num, game_code, teams_game[1], "2022-2023", FALSE) 

## End(Not run)


BAwiR documentation built on Feb. 27, 2026, 5:07 p.m.