From 07fbd93c535c7aa3265e07323ee44e2c7cb6dfbf Mon Sep 17 00:00:00 2001 From: Benjamin Howell Date: Thu, 29 Feb 2024 23:23:46 -0500 Subject: [PATCH] that was a really stupid error --- R/pwhl_team_roster.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/pwhl_team_roster.R b/R/pwhl_team_roster.R index 2e2e0ee..35d7e00 100644 --- a/R/pwhl_team_roster.R +++ b/R/pwhl_team_roster.R @@ -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) { @@ -102,6 +102,8 @@ pwhl_team_roster <- function(team, season, regular = TRUE) { } + } else { + next } } @@ -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)