Skip to content

Commit 02f8613

Browse files
committed
Fix 60 yard fg bug
1 parent e54911d commit 02f8613

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: nflfastR
33
Title: Functions to Efficiently Access NFL Play by Play Data
4-
Version: 5.1.0.9002
4+
Version: 5.1.0.9003
55
Authors@R:
66
c(person(given = "Sebastian",
77
family = "Carl",
@@ -70,6 +70,6 @@ Suggests:
7070
testthat (>= 3.0.0)
7171
Encoding: UTF-8
7272
LazyData: true
73-
RoxygenNote: 7.3.2
73+
RoxygenNote: 7.3.3
7474
Roxygen: list(markdown = TRUE)
7575
Config/testthat/edition: 3

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- Bump required fastrmodels version to 2.0 for better compatibility with xgboost.
44
- Fixed an issue with duplicated play IDs in some 2000 games. (#521)
55
- Added the argument `pbp` to `calculate_stats()` to allow stats calculation based on subsets of nflverse play-by-play data. (#524)
6+
- Fixed a bug where `calculate_stats()` didn't count 60 yard field goal attempts in `"fg_made_60_"` and `"fg_missed_60_"`. (#531)
67

78
# nflfastR 5.1.0
89

R/calculate_stats.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,13 +366,13 @@ calculate_stats <- function(seasons = nflreadr::most_recent_season(),
366366
fg_made_30_39 = sum((stat_id == 70) * (yards %between% c(30, 39))),
367367
fg_made_40_49 = sum((stat_id == 70) * (yards %between% c(40, 49))),
368368
fg_made_50_59 = sum((stat_id == 70) * (yards %between% c(50, 59))),
369-
fg_made_60_ = sum((stat_id == 70) * (yards > 60)),
369+
fg_made_60_ = sum((stat_id == 70) * (yards >= 60)),
370370
fg_missed_0_19 = sum((stat_id == 69) * (yards %between% c(0, 19))),
371371
fg_missed_20_29 = sum((stat_id == 69) * (yards %between% c(20, 29))),
372372
fg_missed_30_39 = sum((stat_id == 69) * (yards %between% c(30, 39))),
373373
fg_missed_40_49 = sum((stat_id == 69) * (yards %between% c(40, 49))),
374374
fg_missed_50_59 = sum((stat_id == 69) * (yards %between% c(50, 59))),
375-
fg_missed_60_ = sum((stat_id == 69) * (yards > 60)),
375+
fg_missed_60_ = sum((stat_id == 69) * (yards >= 60)),
376376
fg_made_list = fg_list(stat_id, yards, collapse_id = 70),
377377
fg_missed_list = fg_list(stat_id, yards, collapse_id = 69),
378378
fg_blocked_list = fg_list(stat_id, yards, collapse_id = 71),

0 commit comments

Comments
 (0)