Test if all values in column are NA

Scott Prevost

2019/02/28

Test if all values in a column are NA.


all(is.na(dt$column))    # TRUE

all(is.na(c(NA, 0, NA))) # FALSE

Links: https://stackoverflow.com/questions/9417391/how-to-check-if-entire-vector-has-no-values-other-than-na-or-nan-in-r