Open schuemie opened 1 year ago
So this is a bit of an annoying one. The tidyselect package started throwing warnings for using .data$
in dplyr calls, removing these now creates this problem. It is possible to overcome this by adding a statement like cohortId <- NULL
at the top of each function, so it looks like there is a local binding for the variable but, to me, this makes the code less readable.
I think you should just use quotes? So
data %>%
select(.data$field)
becomes
data %>%
select("field")
Which shouldn't trigger R check warnings.
So this works for inside select statements, but not inside filter
, mutate
etc - there the field is interpreted as a string
So for dplyr select
and rename
statements you should use quotes, and all other dplyr statements need .data$
to avoid R check notes.
There are also other notes and warnings in R check that can quite easily be resolved.
R check (in develop) currently shows these code issues. I would resolve all of them. Most are probably nonsense, but if you don't fix those you won't see the ones that aren't: