This is a method for the tidyr drop_na()
generic. It is translated to
data.table::na.omit()
# S3 method for dtplyr_step drop_na(data, ...)
data | A |
---|---|
... | < |
library(dplyr) library(tidyr) dt <- lazy_dt(tibble(x = c(1, 2, NA), y = c("a", NA, "b"))) dt %>% drop_na()#> Source: local data table [1 x 2] #> Call: na.omit(`_DT6`) #> #> x y #> <dbl> <chr> #> 1 1 a #> #> # Use as.data.table()/as.data.frame()/as_tibble() to access results#> Source: local data table [2 x 2] #> Call: na.omit(`_DT6`, cols = "x") #> #> x y #> <dbl> <chr> #> 1 1 a #> 2 2 NA #> #> # Use as.data.table()/as.data.frame()/as_tibble() to access results#> Source: local data table [1 x 2] #> Call: na.omit(`_DT6`, cols = c("x", "y")) #> #> x y #> <dbl> <chr> #> 1 1 a #> #> # Use as.data.table()/as.data.frame()/as_tibble() to access results