tidyr (version 1.1.3)

drop_na: Drop rows containing missing values

Description

Drop rows containing missing values

Usage

drop_na(data, ...)

Arguments

data

A data frame.

...

<tidy-select> Columns to inspect for missing values.

Examples

# NOT RUN {
library(dplyr)
df <- tibble(x = c(1, 2, NA), y = c("a", NA, "b"))
df %>% drop_na()
df %>% drop_na(x)

vars <- "y"
df %>% drop_na(x, any_of(vars))
# }