Closed heliconone closed 8 months ago
The docs for across()
mention:
You can't select grouping columns because they are already automatically handled by the verb
This includes doing negation. You should just assume that across()
can't see a
because its a grouping variable, and do everything()
here instead
When using negated selections in
across()
(e.g.!a
or!(a:b)
) the negated variable(s) can't subsequently be used with the.by
argument in dplyr's verbs.Created on 2024-03-29 with reprex v2.1.0
There are many obvious workarounds but I would have imagined the above would work.