From 36d2c8422f40133d56157407d413ba04d557db32 Mon Sep 17 00:00:00 2001 From: eitsupi Date: Mon, 21 Oct 2024 13:20:33 +0000 Subject: [PATCH] use `anyNA()` instead of `any(is.na())` --- R/standalone-types-check.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/standalone-types-check.R b/R/standalone-types-check.R index 22ea57ba8..6c54b7253 100644 --- a/R/standalone-types-check.R +++ b/R/standalone-types-check.R @@ -1,7 +1,7 @@ # --- # repo: r-lib/rlang # file: standalone-types-check.R -# last-updated: 2023-03-13 +# last-updated: 2024-10-21 # license: https://unlicense.org # dependencies: standalone-obj-type.R # imports: rlang (>= 1.1.0) @@ -471,7 +471,7 @@ check_character <- function(x, if (!missing(x)) { if (is_character(x)) { - if (!allow_na && any(is.na(x))) { + if (!allow_na && anyNA(x)) { abort( sprintf("`%s` can't contain NA values.", arg), arg = arg,