count_NA(c(1, NA, 3, NA, 5, NA))
test_df <- data.frame(X1 = rep(c(1, NA), 5), X2 = c(1:9, NA))
count_NA(test_df)
count_NA(test_df, "cols") # the default
count_NA(test_df, "rows")
count_NA(test_df, "all")
Run the code above in your browser using DataLab