signaturescience / fiphde

Forecasting Influenza in Support of Public Health Decision Making
https://signaturescience.github.io/fiphde/
GNU General Public License v3.0
3 stars 1 forks source link

ts_format_for_submission, fabletools::unpack_hilo, broken with tidyr 1.3.0 #148

Closed stephenturner closed 1 year ago

stephenturner commented 1 year ago

I installed tidyr 1.3.0 this morning and it broke ts_format_for_submission(). I don't have a reprex yet, but I think the problem actually lives in fabletools. And it looks like there's already a fix in the development version!

https://github.com/tidyverts/fabletools/commit/dd9027da9c21d99b9f2c8dbb662d7ae465933e68

Problem happens here. I think installing fabletools from github should fix the issue.

> frmtted_fit <- ts_format_for_submission(fit$tsfor, .target = "wk ahead CLI pct",.counts = FALSE)
Error in `tidyr::unpack()`:
! Can't rename variables in this context.
Run `rlang::last_error()` to see where the error occurred.
> rlang::last_error()
<error/tidyselect:::error_disallowed_rename>
Error in `tidyr::unpack()`:
! Can't rename variables in this context.
---
Backtrace:
  1. base::source("~/sigsci/forecasting/clifford/cli_run.R", echo = TRUE)
 13. fabletools::unpack_hilo(., dplyr::ends_with("%"))
 14. tidyr::unpack(data, cols, names_sep = names_sep, names_repair = names_repair)
stephenturner commented 1 year ago

This is fixed in https://github.com/tidyverts/fabletools/commit/dd9027da9c21d99b9f2c8dbb662d7ae465933e68.

for now, use remotes::install_github("tidyverts/fabletools"), and when prompted, also install update mitchelloharawild/distributional from github. Hopefully these will be fixed in a near-term CRAN release.