Learn R Programming

tidyplus (version 0.2.0)

drop_na_all: Drop rows containing all missing values

Description

This is a convenient way to drop uninformative rows from a data frame.

Usage

drop_na_all(data, ...)

Value

The original data frame with rows for which all values are missing dropped.

Arguments

data

A data frame.

...

<tidy-select> Columns to inspect for missing values. If empty, all columns are used.

See Also

tidyr::drop_na and drop_uninformative_columns

Examples

Run this code
data <- tibble::tibble(
  a = c(NA, NA, NA), b = c(1, 1, NA), c = c(2, NA, NA)
)

drop_na_all(data)
drop_na_all(data, a, c)

Run the code above in your browser using DataLab