From a8f90520c45ecf5e6d2e8abd61a641613e622761 Mon Sep 17 00:00:00 2001 From: mrcaseb Date: Fri, 17 Jan 2025 13:33:02 +0100 Subject: [PATCH] add comment to make clear why I did not handle completed reg seasons differently --- R/simulations_simulate_chunks.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/simulations_simulate_chunks.R b/R/simulations_simulate_chunks.R index 9843411..3ef5c3f 100644 --- a/R/simulations_simulate_chunks.R +++ b/R/simulations_simulate_chunks.R @@ -77,6 +77,11 @@ simulate_chunk <- function(chunk, # We need conference ranks to identify playoff teams # sim_games includes games with missing results, i.e. post season, remove them # for the standings calculation + # NOTE: in case all regular season games are done before we enter the sims, + # we could calculate standings based on one season only and replicate it like + # we do with sim_games. However, we would have to pass standings, and h2h and + # write a bunch of code to handle that situation. Yes, it would be faster to + # simulate postseason only, but the speed increase isn't really worth the effort. standings <- nfl_standings( games = sim_games[!is.na(result)], # this is an undocumented feature that make standings return the h2h table