Skip to content

Commit

Permalink
added conditions for games played for standings-race
Browse files Browse the repository at this point in the history
  • Loading branch information
FlavioLeccese92 committed Mar 2, 2024
1 parent 28b2032 commit c9c33aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Binary file modified man/figures/team-standings-race.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions vignettes/articles/team-standings-race.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ CompetitionStandings <-
by = "TeamCode") %>%
left_join(CompetitionStandings %>% filter(Round == MaxRound) %>%
arrange(desc(Position)) %>%
mutate(y = factor(glue("**#{Position}** ({GamesWon*2} pts {GamesPlayed} gp) - {TeamName}"),
levels = glue("**#{Position}** ({GamesWon*2} pts {GamesPlayed} gp) - {TeamName}"))) %>%
mutate(
gp = ifelse(max(GamesPlayed) != min(GamesPlayed), glue(" {GamesPlayed} gp"), ""),
y = factor(glue("**#{Position}** ({GamesWon*2} pts{gp}) - {TeamName}"),
levels = glue("**#{Position}** ({GamesWon*2} pts{gp}) - {TeamName}"))) %>%
select(y, Position),
by = "Position") %>%
filter(Round %in% (MaxRound - NRounds):MaxRound) %>%
Expand Down

0 comments on commit c9c33aa

Please sign in to comment.