powered by
This is a method for the tidyr drop_na() generic. It is translated to data.table::na.omit()
drop_na()
data.table::na.omit()
# S3 method for dtplyr_step drop_na(data, ...)
A lazy_dt().
lazy_dt()
<tidy-select> Columns to inspect for missing values. If empty, all columns are used.
tidy-select
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))
Run the code above in your browser using DataLab