Check character vectors for non-ASCII characters or common NULL value placeholders.
A vector to check.
A vector of values to be treated as missing. The testdat.miss or testdat.miss_text option is used by default.
A logical vector flagging records that have passed or failed the check.
Other vector checks:
chk-dates
,
chk-dummy
,
chk-labels
,
chk-patterns
,
chk-uniqueness
,
chk-values
chk_ascii(c("a", "\U1f642")) # detect non-ASCII characters
#> [1] TRUE FALSE
imported_data <- c(1, "#n/a", 2, "", 3, NA)
chk_text_miss(imported_data)
#> [1] FALSE TRUE FALSE TRUE FALSE TRUE
chk_text_nmiss(imported_data) # Equivalent to !chk_text_miss(imported_data)
#> [1] TRUE FALSE TRUE FALSE TRUE FALSE