diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION new file mode 100644 index 0000000..216f599 --- /dev/null +++ b/CRAN-SUBMISSION @@ -0,0 +1,3 @@ +Version: 1.6.0 +Date: 2025-11-14 15:54:04 UTC +SHA: bf02fecf6caf26be69dccf5197355ff1a89431e1 diff --git a/DESCRIPTION b/DESCRIPTION index 6f57a01..5f51aa2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: nflplotR Title: NFL Logo Plots in 'ggplot2' and 'gt' -Version: 1.5.0.9003 +Version: 1.6.0 Authors@R: person("Sebastian", "Carl", , "mrcaseb@gmail.com", role = c("aut", "cre")) Description: A set of functions to visualize National Football League diff --git a/NEWS.md b/NEWS.md index 5ac0fef..ccaa025 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# nflplotR (development version) +# nflplotR 1.6.0 * Added new experimental function `gt_pct_bar()`. A helper that adds filled percentage bars to 'gt' table to add context to values. (#76, #77) * Changed css styling of images in package documentation by CRAN request. (#90) @@ -10,7 +10,7 @@ * The theme elements `element_nfl_logo()` and `element_nfl_wordmark()` now clean team abbreviations by calling `nflreadr::clean_team_abbrs()` and insert empty grobs for mismatches. * All geoms and theme elements will print more informative warnings about team abbreviation, or player ID mismatches. * The gt logo rendering functions now add alt text for accessibility and to silence an annoying pkgdown warning. (#69) -* nflplotR now requires R 4.1 because magick needs this R version. This also follows the [Tidyverse R version support rules](https://www.tidyverse.org/blog/2019/04/r-version-support/). (#71) +* nflplotR now requires R 4.1 because magick needs this R version. This also follows the [Tidyverse R version support rules](https://tidyverse.org/blog/2019/04/r-version-support/). (#71) # nflplotR 1.4.0 diff --git a/R/nfl_team_factors.R b/R/nfl_team_factors.R index 63f5d9d..40d4693 100644 --- a/R/nfl_team_factors.R +++ b/R/nfl_team_factors.R @@ -66,7 +66,13 @@ nfl_team_factor <- function(teams, ...) { n_args <- rlang::dots_n(...) # load nflreadr teams and make it a data.table - nfl_teams <- data.table::setDT(nflreadr::load_teams()) + nfl_teams <- try(data.table::setDT(nflreadr::load_teams()), silent = TRUE) + if (nrow(nfl_teams) == 0L) { + cli::cli_alert_warning( + "Failed to download team info. Will return teams data." + ) + return(teams) + } div_split <- data.table::tstrsplit(nfl_teams$team_division, " ") nfl_teams$team_division_rev <- paste(div_split[[2]], div_split[[1]]) diff --git a/R/utils.R b/R/utils.R index d6c20c4..ab43263 100644 --- a/R/utils.R +++ b/R/utils.R @@ -94,7 +94,6 @@ NULL # nocov start release_bullets <- function() { c( - '`devtools::check_mac_release()`', '`nflfastR:::my_rhub_check()`', '`pkgdown::check_pkgdown()`', '`nflfastR:::nflverse_thanks()`', diff --git a/cran-comments.md b/cran-comments.md index 227d6f1..6c209e9 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,6 +1,6 @@ ## Submission -This is a minor release that makes nflplotR compatible with ggplot2 v4 and now fully transitioned its internals to ggpath v1.1.0 +This is a minor release that fixes an issue with images in Rd files (requested by CRAN) and introduces a new experimental feature. ## R CMD check results