drop_na.dtplyr_step {dtplyr} | R 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 |
... |
< |
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))
[Package dtplyr version 1.3.1 Index]