djvdj icon indicating copy to clipboard operation
djvdj copied to clipboard

warnings after new tidyselect

Open jayhesselberth opened this issue 1 year ago • 3 comments

There are lots of these warnings in the tests after new tidyselect:

Warning (test-filter-vdj.R:104): filter_vdj all cells filtered
Use of .data in tidyselect expressions was deprecated in tidyselect 1.2.0.
i Please use `".KEEP"` instead of `.data$.KEEP`
Backtrace:
  1. vdj_so %>% filter_vdj(chains == "BAD")
       at test-filter-vdj.R:104:2
  2. djvdj::filter_vdj(., chains == "BAD")
  4. dplyr:::select.data.frame(vdj, -.data$.KEEP)
  7. tidyselect::eval_select(expr(c(...)), .data)
  8. tidyselect:::eval_select_impl(...)
 12. tidyselect:::vars_select_eval(...)
 13. tidyselect:::walk_data_tree(expr, data_mask, context_mask)
 14. tidyselect:::eval_c(expr, data_mask, context_mask)
 15. tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
 16. tidyselect:::walk_data_tree(new, data_mask, context_mask)
 17. tidyselect:::expr_kind(expr, context_mask, error_call)
 18. tidyselect:::call_kind(expr, context_mask, error_call)

jayhesselberth avatar Oct 31 '22 21:10 jayhesselberth

Removal of all .data$ use makes these warnings go away but creates a lot of new ones:

  .calc_freq: no visible binding for global variable ‘.freq’
    (/home/runner/work/djvdj/djvdj/check/djvdj.Rcheck/00_pkg_src/djvdj/R/calc-abundance.R:130-134)
  .calc_freq: no visible binding for global variable ‘.n_cells’
    (/home/runner/work/djvdj/djvdj/check/djvdj.Rcheck/00_pkg_src/djvdj/R/calc-abundance.R:130-134)

jayhesselberth avatar Nov 01 '22 12:11 jayhesselberth

This is one strategy to eliminate the tidyselect warnings.

jayhesselberth avatar Nov 01 '22 12:11 jayhesselberth

I see now that I misread the warning. Need to quote the data-variable ".KEEP".

i Please use `".KEEP"` instead of `.data$.KEEP`

jayhesselberth avatar Nov 01 '22 12:11 jayhesselberth

see #126 and #127

sheridar avatar Dec 15 '22 03:12 sheridar