diff --git a/DESCRIPTION b/DESCRIPTION index f43bb5e..58057e2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -27,7 +27,7 @@ Imports: tibble, tidyr Suggests: - gt, + gt (>= 0.9.0), knitr, nflplotR (>= 1.2.0), rmarkdown, diff --git a/NEWS.md b/NEWS.md index 9980ba3..6ee3826 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ * Fixed error in `simulate_nfl()` where it crashes because the "fake schedule" isn't a tibble. (#43) * The `summary` method `summary.nflseedR_simulation()` explicitly sets the columns width of the logo column because those columns are hidden in some unclear scenarios. +* New function `nfl_standings()` for high efficient standings calculation. The functions `compute_division_ranks()`, `compute_conference_seeds()`, and `compute_draft_order()` will be deprecated in a future release. +* The `summary` method `summary.nflseedR_simulation()` now requires gt version v0.9.0 or higher to avoid warnings about deprecated arguments. # nflseedR 1.2.0 diff --git a/R/summary_nflseedR.R b/R/summary_nflseedR.R index e5fcfe4..e4f820e 100644 --- a/R/summary_nflseedR.R +++ b/R/summary_nflseedR.R @@ -28,7 +28,7 @@ #' @export summary.nflseedR_simulation <- function(object, ...){ rlang::check_installed( - c("gt", "scales (>= 1.2.0)", "nflplotR (>= 1.2.0)"), + c("gt (>= 0.9.0)", "scales (>= 1.2.0)", "nflplotR (>= 1.2.0)"), "to compute a summary table." ) @@ -145,14 +145,14 @@ summary.nflseedR_simulation <- function(object, ...){ gt::ends_with("won_conf"), gt::ends_with("won_sb") ), - colors = scales::col_numeric(palette = table_colors_positive, domain = c(0, 1)) + fn = scales::col_numeric(palette = table_colors_positive, domain = c(0, 1)) ) %>% gt::data_color( columns = c( gt::ends_with("draft1"), gt::ends_with("draft5") ), - colors = scales::col_numeric(palette = table_colors_negative, domain = c(0, 1)) + fn = scales::col_numeric(palette = table_colors_negative, domain = c(0, 1)) ) %>% nflplotR::gt_nfl_logos(locations = gt::cells_body(gt::ends_with("team"))) %>% gt::tab_source_note("nflseedR") %>%