nba_add_advanced_metrics: *Append Advanced Metrics to a Box Score*

View source: R/nba_scaling.R

nba_add_advanced_metricsR Documentation

Append Advanced Metrics to a Box Score

Description

Detects the standard hoopR / stats.nba.com box-score columns present in df and appends the advanced metrics it can compute from them (true-shooting %, effective field-goal %, free-throw rate, turnover %, assist-to-turnover ratio and Hollinger game score). Columns are matched case-insensitively against common aliases; metrics whose inputs are absent are skipped (reported via a message), so it is safe to pass any box score.

Usage

nba_add_advanced_metrics(df)

Arguments

df

A data frame / tibble of player or team box-score rows.

Value

df with the available advanced-metric columns appended.

See Also

Other Basketball Analytics Utilities: espn_basketball_player_core(), 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_per_possessions(), nba_possessions(), nba_true_shooting_pct(), nba_turnover_pct(), nba_usage_rate()

Examples

box <- data.frame(player = "A", pts = 30, fgm = 10, fga = 20,
                  fg3m = 4, ftm = 7, fta = 8, oreb = 1, dreb = 6,
                  ast = 8, stl = 2, blk = 1, pf = 2, tov = 3)
nba_add_advanced_metrics(box)

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