| nba_per_minutes | R Documentation |
Rescale counting stats to a per-minute basis (defaults to the
familiar per-36). Adds one "{col}_per_{per}" column per requested stat;
the original columns are left untouched.
nba_per_minutes(df, cols, minutes = "min", per = 36)
df |
A data frame / tibble of box-score rows. |
cols |
Character vector of counting-stat columns to rescale
(e.g. |
minutes |
Name of the minutes column. Defaults to |
per |
Minutes to scale to. Defaults to |
df with the added per-minute 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_possessions(),
nba_possessions(),
nba_true_shooting_pct(),
nba_turnover_pct(),
nba_usage_rate()
box <- data.frame(player = c("A", "B"), min = c(36, 24),
pts = c(18, 8), reb = c(9, 6), ast = c(7, 2))
nba_per_minutes(box, cols = c("pts", "reb", "ast"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.