From d2ae6c6d0ec5d2a6c747091e12addfb1952e6959 Mon Sep 17 00:00:00 2001 From: guga31bb <1425357+guga31bb@users.noreply.github.com> Date: Sun, 8 Sep 2024 09:58:32 -0400 Subject: [PATCH] injury update actual fix (#484) --- DESCRIPTION | 2 +- R/helper_scrape_nfl.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4e8b3b14..f01edd70 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: nflfastR Title: Functions to Efficiently Access NFL Play by Play Data -Version: 4.6.1.9014 +Version: 4.6.1.9015 Authors@R: c(person(given = "Sebastian", family = "Carl", diff --git a/R/helper_scrape_nfl.R b/R/helper_scrape_nfl.R index 66d1207c..aaf6a8a0 100644 --- a/R/helper_scrape_nfl.R +++ b/R/helper_scrape_nfl.R @@ -224,7 +224,7 @@ get_pbp_nfl <- function(id, # Data in 2024 pbp introduced separate "plays" for injury updates # These mess up some of our logic. Since they are useless, we remove them here dplyr::filter( - !(is.na(.data$timeout_team) & stringr::str_detect(tolower(.data$play_description), "\\*\\* injury update:")) + !(is.na(.data$timeout_team) & stringr::str_starts(tolower(.data$play_description), "\\*\\* injury update:")) ) %>% fix_posteams()