| nba_add_advanced_metrics | R Documentation |
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.
nba_add_advanced_metrics(df)
df |
A data frame / tibble of player or team box-score rows. |
df with the available advanced-metric columns appended.
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()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.