filter_na() just wrap {dplyr} functions in a more convenient way, IMO.

filter_na(data, type = c("any", "all"))

Arguments

data

a data frame or tibble

type

a character vector indicating which type of NA-filtering must be done. If type = "any", filter_na() will filter any NA values present in the data frame. If type = "all", filter_na will filter only rows which all columns has NA values.

Value

a tibble object

Examples

if (FALSE) {
nice_data <- data.frame(c1 = c(1, NA), c2 = c(NA, NA))
nice_data %>%
  filter_na("all")
nice_data %>%
  filter_na("any")
}