drop_na

0th

Percentile

Drop rows containing missing values

Drop rows containing missing values

Usage
drop_na(data, ...)
Arguments
data
A data frame.
...
Specification of variables to consider while dropping rows. If empty, consider all variables. Use bare variable names. Select all variables between x and z with x:z, exclude y with -y. For more options, see the select documentation.
See Also

drop_na_ for a version that uses regular evaluation and is suitable for programming with.

Aliases
  • drop_na
Examples
library(dplyr)
df <- data_frame(x = c(1, 2, NA), y = c("a", NA, "b"))
df %>% drop_na()
df %>% drop_na(x)
Documentation reproduced from package tidyr, version 0.6.1, License: MIT + file LICENSE

Community examples

nxskok@gmail.com at Jan 17, 2019 tidyr v0.8.2

```r library(tidyverse) d=tribble( ~x, ~y, ~z, 1, 2, "a", NA, 3, "b", 4, 5, NA, 6, NA, "c", 7, 8, "d" ) d %>% drop_na() d %>% drop_na(-z) ```