pharmaverse / sdtm.oak

An EDC and Data Standard agnostic SDTM data transformation engine that automates the transformation of raw clinical data in ODM format to SDTM based on standard mapping algorithms
https://pharmaverse.github.io/sdtm.oak/
Apache License 2.0
25 stars 7 forks source link

Warnings due to _Using an external vector in selections was deprecated in tidyselect 1.1.0._ #68

Closed ramiromagno closed 1 month ago

ramiromagno commented 1 month ago

We're getting warnings about tidyselection with vectors, see e.g. checks here: https://github.com/pharmaverse/sdtm.oak/actions/runs/9976393726/job/27568469297.

It is not obvious to me where the tidyselection is happening with vectors. I believe the warning message is also misleading when it suggests select(), as mentioned here: https://github.com/r-lib/tidyselect/issues/334. I think in our case it is more indirect. It is a bit difficult to pinpoint where this is happening because locally I don't get these warnings. Not sure if this has anything to do with different behavior between direct / indirect usage, as explained here: https://www.tidyverse.org/blog/2022/10/tidyselect-1-2-0/.

See also: https://tidyselect.r-lib.org/reference/faq-external-vector.html.

ramiromagno commented 1 month ago

Attempt to suppress the warning and add note to cran-comments.md.

ramiromagno commented 1 month ago

For future reference: it turned out that .before / .after in dplyr::mutate() also require tidyselect verbs, e.g. dplyr::all_of(). So this had nothing to do with arguments passed in the ellipsis or with the NSE being employed. Better this way!

Kudos to Adam (https://github.com/pharmaverse/sdtm.oak/commit/cc5ad17fb1af6745d11f4c9ae4f0f2f2a99f1fc3)!