Skip to content

Commit

Permalink
fix fantasy for qb scramble
Browse files Browse the repository at this point in the history
  • Loading branch information
guga31bb committed Feb 12, 2021
1 parent 279519d commit 5398ea2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/helper_additional_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,13 @@ clean_pbp <- function(pbp, ...) {
fantasy = case_when(
!is.na(.data$rusher) ~ .data$rusher,
is.na(.data$rusher) & !is.na(.data$receiver) ~ .data$receiver,
.data$qb_scramble == 1 ~ .data$passer,
TRUE ~ NA_character_
),
fantasy_id = case_when(
!is.na(.data$rusher_id) ~ .data$rusher_id,
is.na(.data$rusher_id) & !is.na(.data$receiver_id) ~ .data$receiver_id,
.data$qb_scramble == 1 ~ .data$passer_id,
TRUE ~ NA_character_
),
out_of_bounds = dplyr::if_else(
Expand Down

0 comments on commit 5398ea2

Please sign in to comment.