nba_per_possessions: *Scale Box-Score Counting Stats Per N Possessions*

View source: R/nba_scaling.R

nba_per_possessionsR Documentation

Scale Box-Score Counting Stats Per N Possessions

Description

Rescale counting stats to a per-possession basis (defaults to the familiar per-100). Adds one "{col}_per_{per}" column per requested stat.

Usage

nba_per_possessions(df, cols, possessions = "poss", per = 100)

Arguments

df

A data frame / tibble of box-score rows.

cols

Character vector of counting-stat columns to rescale.

possessions

Name of the possessions column. Defaults to "poss".

per

Possessions to scale to. Defaults to 100.

Value

df with the added per-possession columns.

See Also

Other Basketball Analytics Utilities: espn_basketball_player_core(), nba_add_advanced_metrics(), nba_assist_pct(), nba_assist_to_turnover(), nba_defensive_rating(), nba_effective_fg_pct(), nba_four_factors(), nba_ft_rate(), nba_game_score(), nba_net_rating(), nba_offensive_rating(), nba_oreb_pct(), nba_pace(), nba_per_minutes(), nba_possessions(), nba_true_shooting_pct(), nba_turnover_pct(), nba_usage_rate()

Examples

box <- data.frame(team = c("A", "B"), poss = c(98, 102),
                  pts = c(112, 109), tov = c(13, 11))
nba_per_possessions(box, cols = c("pts", "tov"))

hoopR documentation built on Aug. 25, 2026, 9:07 a.m.