drop_na | R Documentation |
Drop rows containing missing values
drop_na(.df, ...)
.df |
A data.frame or data.table |
... |
Optional: A selection of columns. If empty, all variables are selected.
|
df <- data.table(
x = c(1, 2, NA),
y = c("a", NA, "b")
)
df %>%
drop_na()
df %>%
drop_na(x)
df %>%
drop_na(where(is.numeric))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.