filter_na: Easily filter NA values from data frames

View source: R/filter_na.R

filter_naR Documentation

Easily filter NA values from data frames

Description

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

Usage

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

## Not run: 
nice_data <- data.frame(c1 = c(1, NA), c2 = c(NA, NA))
nice_data %>%
  filter_na("all")
nice_data %>%
  filter_na("any")

## End(Not run)

kguidonimartins/misc documentation built on Dec. 20, 2024, 7:03 p.m.