| nba_per_possessions | R Documentation |
Rescale counting stats to a per-possession basis (defaults to the
familiar per-100). Adds one "{col}_per_{per}" column per requested stat.
nba_per_possessions(df, cols, possessions = "poss", per = 100)
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 |
per |
Possessions to scale to. Defaults to |
df with the added per-possession columns.
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()
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.