| chk_all_na | R Documentation |
Checks if all missing values using
all(is.na(x))
Pass: NA, c(NA, NA), logical(0).
Fail: 1, 1:2, "1", c(1, NA).
chk_all_na(x, x_name = NULL)
vld_all_na(x)
x |
The object to check. |
x_name |
A string of the name of object x or NULL. |
The chk_ function throws an informative error if the test fails or
returns the original object if successful so it can used in pipes.
The vld_ function returns a flag indicating whether the test was met.
vld_all_na(): Validate All Missing Values
For more details about the use of this function,
please read the article
vignette("chk-families").
Other misc_checkers:
chk_join(),
chk_not_any_na(),
chk_not_empty(),
chk_unique()
# chk_all_na
try(chk_all_na(1))
try(chk_all_na(c(1, NA)))
chk_all_na(NA)
chk_all_na(c(NA, NA_character_, NA_real_))
# vld_all_na
vld_all_na(1)
vld_all_na(1:2)
vld_all_na(NA_real_)
vld_all_na(integer(0))
vld_all_na(c(NA, 1))
vld_all_na(TRUE)
vld_all_na(c(NA_real_, NA_character_))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.