Skip to content

Commit

Permalink
variable name and order consistency
Browse files Browse the repository at this point in the history
closes #370
  • Loading branch information
mrcaseb committed Jul 20, 2023
1 parent 41b1510 commit 11c5517
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions R/aggregate_game_stats_def.R
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ calculate_player_stats_def <- function(pbp, weekly = FALSE) {
def_fumbles_forced = sum(.data$def_fumbles_forced),
def_sacks = sum(.data$def_sacks),
def_sack_yards = sum(.data$def_sack_yards),
def_qb_hit = sum(.data$def_qb_hits),
def_qb_hits = sum(.data$def_qb_hits),
def_interceptions = sum(.data$def_interceptions),
def_interception_yards = sum(.data$def_interception_yards),
def_pass_defended = sum(.data$def_pass_defended),
Expand All @@ -594,7 +594,18 @@ calculate_player_stats_def <- function(pbp, weekly = FALSE) {
def_penalty = sum(.data$def_penalty),
def_penalty_yards = sum(.data$def_penalty_yards)
) %>%
dplyr::ungroup()
dplyr::ungroup() %>%
dplyr::select(
"player_id",
"player_name",
"player_display_name",
"games",
"position",
"position_group",
"headshot_url",
"team",
dplyr::everything()
)
}

player_df
Expand Down

0 comments on commit 11c5517

Please sign in to comment.