From ea1fa2ccf589b2c00f03262f7ae5c7a27a82ea44 Mon Sep 17 00:00:00 2001 From: mrcaseb Date: Sun, 10 Nov 2024 16:37:48 +0100 Subject: [PATCH] Describe variable name differences --- vignettes/stats_variables.Rmd | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/vignettes/stats_variables.Rmd b/vignettes/stats_variables.Rmd index 4ddde5a3..c2c188df 100644 --- a/vignettes/stats_variables.Rmd +++ b/vignettes/stats_variables.Rmd @@ -12,6 +12,22 @@ with_dt <- requireNamespace("DT") ``` +Below you will find a table that lists and explains all the variables available in `calculate_stats()`. Compared to the old `calculate_player_stats*()` functions that have been deprecated, practically all variables (and their names) have been preserved. However, there are a few differences. These are + +- `recent_team`: renamed to `team` (recent team in weekly data never made sense) +- `interceptions`: renamed to `passing_interceptions` (all passing stats have the passing prefix) +- `sacks`: renamed to `sacks_suffered` (to make clear it's not on defensive side) +- `sack_yards`: renamed to `sack_yards_lost` (to make clear it's not on defensive side) +- `dakota`: not implemented at the moment +- `def_tackles`: there is `def_tackles_solo` and `def_tackles_with_assist` +- `def_fumble_recovery_own`: renamed to `fumble_recovery_own` (it is not exclusive to defense) +- `def_fumble_recovery_yards_own`: renamed to `fumble_recovery_yards_own` (it is not exclusive to defense) +- `def_fumble_recovery_opp`: renamed to `fumble_recovery_opp` (it is not exclusive to defense) +- `def_fumble_recovery_yards_opp`: renamed to `fumble_recovery_yards_opp` (it is not exclusive to defense) +- `def_safety`: renamed to `def_safeties` (we use plural everywhere) +- `def_penalty`: renamed to `penalties` (it is not exclusive to defense) +- `def_penalty_yards`: renamed to `penalty_yards` (it is not exclusive to defense) + ```{r eval = with_dt} DT::datatable(nflfastR::nfl_stats_variables,options = list(scrollX = TRUE, pageLength = 25), filter = "top", rownames = FALSE) ```