This is my code:
airquality %>% filter(across(everything(), ~ sum(is.na(.x)) > 1))
I am trying to filter the rows with more than one NAs.
The only way I achieve this was using mutate function.
airquality %>% rowwise() %>% mutate(n_NA = sum(is.na(across(everything())))) %>%
filter(n_NA > 1)
But its not a clever way.
I need to use only filter function.
Any help?