Skip to content

Commit

Permalink
Merge pull request #44 from sportsdataverse/pwhl_scraper
Browse files Browse the repository at this point in the history
Fixing bug introduced in previous PR
  • Loading branch information
benhowell71 authored Mar 1, 2024
2 parents 2959468 + 07fbd93 commit 5b93d02
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/pwhl_team_roster.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
pwhl_team_roster <- function(team, season, regular = TRUE) {

# team_id <- 1 # will need the team/season look ups
team_id <- pwhl_teams() %>%
team_id <- fastRhockey::pwhl_teams() %>%
dplyr::filter(.data$team_label == team)
# season_id <- 2 # 1 is regular season, 2 is pre-season
if (regular) {
Expand Down Expand Up @@ -102,6 +102,8 @@ pwhl_team_roster <- function(team, season, regular = TRUE) {

}

} else {
next
}

}
Expand All @@ -115,7 +117,7 @@ pwhl_team_roster <- function(team, season, regular = TRUE) {
season = season,
player_id = as.numeric(player_id),
team_id = as.numeric(team_id$team_id),
team = team_id$team_name
team = team
) %>%
dplyr::relocate("team_id", .after = player_id) %>%
dplyr::relocate("season", .after = team_id)
Expand Down

0 comments on commit 5b93d02

Please sign in to comment.