Require usage of !any(.) over all(!.), !all(.) over any(!.)
Source:R/outer_negation_linter.R
outer_negation_linter.Rd
any(!x)
is logically equivalent to !any(x)
; ditto for the equivalence of
all(!x)
and !any(x)
. Negating after aggregation only requires inverting
one logical value, and is typically more readable.
See also
linters for a complete list of linters available in lintr.