From 8faa20ed601a5b3d9eec5a568993aaba9f918012 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Wed, 13 Dec 2023 20:02:29 -0800 Subject: [PATCH] Use anyNA(.) over NA %in% . Discovered on GitHub search, related to work on https://github.com/r-lib/lintr/issues/2113 --- R/lint.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/lint.R b/R/lint.R index ac90128..e789871 100644 --- a/R/lint.R +++ b/R/lint.R @@ -49,7 +49,7 @@ pkg_lifecycle_statuses <- function(package, which = c("superseded", "deprecated" res <- vctrs::vec_rbind(!!!res) # Filter funs without a lifecycle - if (!NA %in% which) { + if (!anyNA(which)) { res <- res[!is.na(res$lifecycle), ] }