You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dat<- tribble(
~x, ~y,
1 , 2,
3 , NA,
NA, NA
)
## drop rows where any selected column is NA (drop_any)dat %>% filter(if_all(everything(), ~!is.na(.x)))
## drop rows where all selected columns are NA (drop_all)dat %>% filter(if_any(everything(), ~!is.na(.x)))
## keep rows where any selected column is NA (keep_any)dat %>% filter(if_any(everything(), is.na))
## keep rows where all selected columns are NA (keep_all)dat %>% filter(if_all(everything(), is.na))
The text was updated successfully, but these errors were encountered:
Add functions like in tidyverse/tidyr#950 (comment), namely
The text was updated successfully, but these errors were encountered: