filter_na()
just wrap {dplyr}
functions in a more
convenient way, IMO.
filter_na(data, type = c("any", "all"))
a data frame or tibble
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.
a tibble object
if (FALSE) {
nice_data <- data.frame(c1 = c(1, NA), c2 = c(NA, NA))
nice_data %>%
filter_na("all")
nice_data %>%
filter_na("any")
}