incidence2 icon indicating copy to clipboard operation
incidence2 copied to clipboard

Warning about change in tidyselect

Open Bisaloo opened this issue 3 years ago • 1 comments

Please place an "x" in all the boxes that apply

  • [x] I have the most recent version of incidence2 and R
  • [x] I have found a bug
  • [x] I have a reproducible example

Please include a brief description of the problem with a code example:

library(incidence2)

data(ebola_sim_clean, package = "outbreaks")
dat <- ebola_sim_clean$linelist

inci <- incidence(dat,
                  date_index = date_of_onset,
                  interval = 7,
                  groups = hospital)

green_grey <- "#5E7E80"

facet_plot(inci, fill = green_grey)
#> Warning: Using an external vector in selections was deprecated in tidyselect 1.1.0.
#> ℹ Please use `all_of()` or `any_of()` instead.
#>   # Was:
#>   data %>% select(green_grey)
#> 
#>   # Now:
#>   data %>% select(all_of(green_grey))
#> 
#> See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.

Created on 2022-10-26 with reprex v2.0.2.9000

Looking at the full error stack, this is caused by

https://github.com/reconverse/incidence2/blob/6d527d1f2d5e0de682a435643d2f6d193f3f734e/R/plot.R#L212-L218


Related: #78

Bisaloo avatar Oct 26 '22 14:10 Bisaloo

cheers - I'll take a look. If it's a quick fix I'll push a patch if not it may have to wait until I have time to work on the re-factor. Plan is to drop NSE completely and (potentially) pull the plotting out (the current plotting code is a ~bit of a~ mess and pain to maintain). Hoping I can improve the scale implementations in {grates} enough so that it can potentially be dropped.

TimTaylor avatar Oct 26 '22 15:10 TimTaylor

tidyselect functionality dropped by https://github.com/reconverse/incidence2/commit/1ef0420a031462eb252d69046fd6fc8f8f1b6c82

TimTaylor avatar Jan 24 '23 15:01 TimTaylor