You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought I had changed all tidyselections to use all_of() / any_of() but I am now getting warnings in rhub's VMs. These warnings do not happen locally on my machine.
If I look at the backtrace it seems that the warnings come from: dplyr::mutate(dat, !!!lst, .by = NULL, .keep = .keep, .after = .after) .
Any pointers on how I can replicate this locally? The fact that I don't see this happening locally has anything to do with direct / indirect usage, as discussed here: https://www.tidyverse.org/blog/2022/10/tidyselect-1-2-0/?
Warning (test-mutate_cnd_df.R:72:3): mutate.cnd_df handles .after parameter correctly
Using an external vector in selections was deprecated in tidyselect 1.1.0.
i Please use `all_of()` or `any_of()` instead.
# Was:
data %>% select(.after)
# Now:
data %>% select(all_of(.after))
See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
Backtrace:
▆
1. ├─dplyr::mutate(cnd_df, z = x + y, .after = "x") at test-mutate_cnd_df.R:72:3
2. └─sdtm.oak:::mutate.cnd_df(cnd_df, z = x + y, .after = "x")
3. ├─dplyr::mutate(dat, !!!lst, .by = NULL, .keep = .keep, .after = .after) at sdtm.oak/R/cnd_df.R:443:3
4. └─dplyr:::mutate.data.frame(...)
5. └─dplyr:::mutate_relocate(...)
6. ├─dplyr::relocate(out, all_of(names), .before = !!before, .after = !!after)
7. └─dplyr:::relocate.data.frame(...)
8. └─dplyr:::eval_relocate(...)
9. └─tidyselect::eval_select(after, data, env = env, error_call = error_call)
10. └─tidyselect:::eval_select_impl(...)
11. ├─tidyselect:::with_subscript_errors(...)
12. │ └─base::withCallingHandlers(...)
13. └─tidyselect:::vars_select_eval(...)
14. └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
15. └─tidyselect:::eval_sym(expr, data_mask, context_mask)
If I run the tests on the file containing this test with testthat::test_file("tests/testthat/test-mutate_cnd_df.R") all tests pass. If I run testthat::test_local() or devtools::test() these warnings come back to haunt me. What am I missing?
Hi,
I thought I had changed all tidyselections to use
all_of()
/any_of()
but I am now getting warnings in rhub's VMs. These warnings do not happen locally on my machine.Example: https://github.com/pharmaverse/sdtm.oak/actions/runs/9976393726/job/27568469297#step:6:210.
If I look at the backtrace it seems that the warnings come from:
dplyr::mutate(dat, !!!lst, .by = NULL, .keep = .keep, .after = .after)
.Any pointers on how I can replicate this locally? The fact that I don't see this happening locally has anything to do with direct / indirect usage, as discussed here: https://www.tidyverse.org/blog/2022/10/tidyselect-1-2-0/?
Original issue: pharmaverse/sdtm.oak#68.
Any help is appreciated!
The text was updated successfully, but these errors were encountered: