It doesn't seem that uncommon of a pattern to find NAs.
library(lintr)
x <- rep(c(TRUE, NA, FALSE, FALSE), 1000)
identical(
sum(is.na(x)) != 0L,
anyNA(x)
)
#> [1] TRUE
# currently doesn't lint
lint(
text = "sum(is.na(x)) != 0L",
linters = any_is_na_linter()
)
Created on 2022-09-30 with reprex v2.0.2