Skip to content

Commit

Permalink
use anyNA() instead of any(is.na())
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi committed Oct 21, 2024
1 parent 3d48c13 commit 36d2c84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/standalone-types-check.R
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 36d2c84

Please sign in to comment.