Skip to content

Commit

Permalink
add team and text to pivot_wider id cols on get_nfl_boxscore_players …
Browse files Browse the repository at this point in the history
…to hopefully fix issue #10
  • Loading branch information
jthomasmock committed Jul 15, 2021
1 parent 2c38db2 commit be765ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/get_nfl_boxscore_players.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ get_nfl_boxscore_players <- function(game_id) {
stat_labels = tolower(stat_labels) %>% gsub(x = ., pattern = "/", replacement = "p"),
stat_labels = gsub(x = stat_labels, pattern = " ", replacement = "_"),
) %>%
pivot_wider(names_from = stat_labels, values_from = stats, id_cols = c(id:displayName)) %>%
pivot_wider(names_from = stat_labels, values_from = stats, id_cols = c(team, text, id:displayName)) %>%
rename(
player_id = id,
player_uid = uid,
Expand Down

0 comments on commit be765ac

Please sign in to comment.