Skip to content

Commit

Permalink
new dplyr throws warning if a join creates new rows
Browse files Browse the repository at this point in the history
we'll just bind_cols and drop game_id as well
  • Loading branch information
mrcaseb committed Nov 2, 2022
1 parent 0970875 commit 70f379a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/helper_scrape_nfl.R
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ get_pbp_nfl <- function(id, dir = NULL, qs = FALSE) {
pbp_stats <- dplyr::bind_rows(pbp_stats)

combined <- game_info %>%
dplyr::left_join(plays %>% dplyr::select(-"playStats"), by = c("game_id")) %>%
dplyr::bind_cols(plays %>% dplyr::select(-"playStats", -"game_id")) %>%
dplyr::left_join(drives, by = c("driveSequenceNumber" = "drive_order_sequence")) %>%
dplyr::left_join(pbp_stats, by = c("playId" = "play_id")) %>%
dplyr::mutate_if(is.logical, as.numeric) %>%
Expand Down

0 comments on commit 70f379a

Please sign in to comment.