checks and diagnoses NA presence in vectors

chk_nas(x)

Arguments

x

A vector of any type

Value

A numeric indicating NA entries, or length 0 vector if none

Examples

x <- c(3,4,5,6,NA,7,NA,8,NA,9)
chk_nas(x)
#> [1] 5 7 9