drop_na.dtplyr_step: Drop rows containing missing values

View source: R/step-call.R

drop_na.dtplyr_stepR Documentation

Drop rows containing missing values

Description

This is a method for the tidyr drop_na() generic. It is translated to data.table::na.omit()

Usage

## S3 method for class 'dtplyr_step'
drop_na(data, ...)

Arguments

data

A lazy_dt().

...

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

Examples

library(dplyr)
library(tidyr)

dt <- lazy_dt(tibble(x = c(1, 2, NA), y = c("a", NA, "b")))
dt %>% drop_na()
dt %>% drop_na(x)

vars <- "y"
dt %>% drop_na(x, any_of(vars))

dtplyr documentation built on March 31, 2023, 9:13 p.m.