A wrapper with dplyr
functions to drop columns with no information (all NA
values)
Arguments
- x
data.frame
- unique
logical, if TRUE (default),
unique()
function will be applied to the result.
Examples
x <- data.frame(a = c(1, 2, NA), b = c(NA, NA, NA), c = c(NA, 2, 3))
drop_na_cols(x)
#> a c
#> 1 1 NA
#> 2 2 2
#> 3 NA 3