r-lib / rlang

Low-level API for programming with R
https://rlang.r-lib.org
Other
489 stars 131 forks source link

check_character() always permits NA values #1724

Open JosiahParry opened 6 days ago

JosiahParry commented 6 days ago

i would like to ensure that check_character() does not permit NA values. However, it always allows them.

source("https://raw.githubusercontent.com/r-lib/rlang/main/R/standalone-obj-type.R")
source("https://raw.githubusercontent.com/r-lib/rlang/main/R/standalone-types-check.R")

# confirm that i have greater than 1.1
packageVersion("rlang")
#> [1] '1.1.3'

# import rlang
library(rlang)

check_character(c("a", NA, "c"), allow_na = FALSE)