Skip to content

Commit

Permalink
Merge pull request #43 from nflverse/fake-schedule-tibble
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcaseb authored Jan 20, 2024
2 parents 51641bf + ddccf8f commit 69fb102
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: nflseedR
Title: Functions to Efficiently Simulate and Evaluate NFL Seasons
Version: 1.2.0
Version: 1.2.0.9000
Authors@R: c(
person("Lee", "Sharpe", role = c("aut", "cph")),
person("Sebastian", "Carl", , "[email protected]", role = c("cre", "aut"))
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# nflseedR (development version)

* Fixed error in `simulate_nfl()` where it crashes because the "fake schedule" isn't a tibble. (#43)

# nflseedR 1.2.0

* `simulate_nfl()` gained the new argument `sim_include` to allow more access to what is actually being simulated. This makes it possible skip playoff simulation or the (possibly heavy) computation of draft order. (#34)
Expand Down
2 changes: 1 addition & 1 deletion R/simulate_nfl.R
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ simulate_nfl <- function(nfl_season = NULL,
".csv?raw=true"
)
tryCatch({
schedule <- data.table::fread(fn)
schedule <- data.table::fread(fn) %>% tibble::as_tibble()
cli::cli_alert_info("No actual schedule exists for {.val {nfl_season}}, using fake schedule with correct opponents.")
}, error = function(cond) {
cli::cli_abort("Unable to locate a schedule for {.val {nfl_season}}")
Expand Down

0 comments on commit 69fb102

Please sign in to comment.