diff --git a/R/calculate_stats.R b/R/calculate_stats.R index 4cfe184c..f8f2e569 100644 --- a/R/calculate_stats.R +++ b/R/calculate_stats.R @@ -126,8 +126,8 @@ calculate_stats <- function(seasons = nflreadr::most_recent_season(), def_tackles_for_loss = sum(stat_id == 402), def_tackles_for_loss_yards = sum((stat_id == 402) * yards), def_fumbles_forced = sum(stat_id == 91), - def_sacks = sum(stat_id == 83), - def_sack_yards = sum((stat_id == 83) * yards), + def_sacks = sum(stat_id == 83) + 1 / 2 * sum(stat_id == 84), + def_sack_yards = sum((stat_id == 83) * -yards) + 1 / 2 * sum((stat_id == 84) * -yards), def_qb_hits = sum(stat_id == 110), def_interceptions = sum(stat_id %in% 25:26), def_interception_yards = sum((stat_id %in% 25:28) * yards),