ropensci / ruODK

ruODK: An R Client for the ODK Central API
https://docs.ropensci.org/ruODK/
GNU General Public License v3.0
41 stars 12 forks source link

Update to new dplyr syntax: select any_of or all_of #146

Closed florianm closed 1 year ago

florianm commented 1 year ago

Problem

ruODK's use of dplyr::select uses now outdated syntax. dplyr suggests all_of or any_of.

ruODK function(s) used

Reproducible example

Warning (test-attachment_get.R:36): attachment_get works
Using an external vector in selections was deprecated in tidyselect 1.1.0.
ℹ Please use `all_of()` or `any_of()` instead.
  # Was:
  data %>% select(colname)

  # Now:
  data %>% select(all_of(colname))

See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
Backtrace:
  1. fresh_raw %>% odata_submission_rectangle() %>% ...
       at test-attachment_get.R:36:2
 12. ruODK:::unnest_all(...)
 15. tidyr::unnest_wider(...)
 16. tidyselect::eval_select(enquo(col), data)
 17. tidyselect:::eval_select_impl(...)
 21. tidyselect:::vars_select_eval(...)
 22. tidyselect:::walk_data_tree(expr, data_mask, context_mask)
 23. tidyselect:::eval_sym(expr, data_mask, context_mask)

Warning (test-handle_ru_attachments.R:43): handle_ru_attachments downloads files from subtables
Using an external vector in selections was deprecated in tidyselect 1.1.0.
ℹ Please use `all_of()` or `any_of()` instead.
  # Was:
  data %>% select(att_cols_sub)

  # Now:
  data %>% select(all_of(att_cols_sub))
Session Info ODK Central version: ```{r} # utils::sessionInfo() ```