Keep columns / variables having atleast one 0 from a tbl. dev
tbl_keep_vars_zero_any(tbl)
tbl | a tbl. |
---|
a tbl.
if (FALSE) { tbl <- tibble(x = letters[1:5] , y = LETTERS[1:5] , z = 0 ,a = 0:4 , b = 1:5) tbl tbl %>% tbl_keep_vars_zero_any() tbl2 <- tibble(x = letters[1:5] , y = LETTERS[1:5] , z = 0 , xx = 0:4) tbl2 %>% tbl_keep_vars_zero_any() }