do_four_factors_df_lineup: Four factors for lineups

View source: R/do_four_factors_df_lineup.R

do_four_factors_df_lineupR Documentation

Four factors for lineups

Description

This function computes offense and defense four factors for a given lineup. The four factors are the effective field goal percentage (EFGP), the turnover percentage (TOVP), the offensive rebound percentage (ORBP) and the free throws rate (FTRate). They are well defined at http://www.rawbw.com/~deano/articles/20040601_roboscout.htm and https://www.basketball-reference.com/about/factors.html.

As a summary, EFGP is a measure of shooting efficiency; TOVP is the percentage of possessions where the team missed the ball; ORBP measures how many rebounds were offensive from the total of available rebounds, and FTRate is a measure of how often a team gets to the line.

Usage

do_four_factors_df_lineup(data_combs, team_name, type_lineup, type_period, type_opponent)

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.

type_opponent

Name of the opponent teams.

Details

Instead of defining the Offensive and Defensive Rebound Percentage as mentioned in the previous links, I have computed just the Offensive Rebound Percentage for the team and for its rivals. This makes easier to have four facets, one per factor, in the ggplot.

Value

A data frame with the four factors in defense and in offense for a given lineup.

Author(s)

Guillermo Vinue

See Also

do_four_factors_df

Examples

## Not run: 
do_four_factors_df_lineup(acb_combs, "Unicaja", "quintet", NULL, NULL)

## End(Not run)


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