Skip to content

Commit 36d2c84

Browse files
committed
use anyNA() instead of any(is.na())
1 parent 3d48c13 commit 36d2c84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/standalone-types-check.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ---
22
# repo: r-lib/rlang
33
# file: standalone-types-check.R
4-
# last-updated: 2023-03-13
4+
# last-updated: 2024-10-21
55
# license: https://unlicense.org
66
# dependencies: standalone-obj-type.R
77
# imports: rlang (>= 1.1.0)
@@ -471,7 +471,7 @@ check_character <- function(x,
471471

472472
if (!missing(x)) {
473473
if (is_character(x)) {
474-
if (!allow_na && any(is.na(x))) {
474+
if (!allow_na && anyNA(x)) {
475475
abort(
476476
sprintf("`%s` can't contain NA values.", arg),
477477
arg = arg,

0 commit comments

Comments
 (0)