I am using tidyverse and I am aware of the filter method which allows to filter all rows that have a value that matches a specific condition such as the following. It filters for all rows that have a value between 0 and 3 in at least on column.
filter_all(any_vars(. > 0 & .<3))
How can I do the same on column basis? If my tibble looks like the following I want to write a select that returns all columns that have in at least one row a value greater than 4 (should return columns B,C)
| A | B | C |
-------------
| 1 | 1 | 2 |
| 2 | 5 | 1 |
| 3 | 6 | 9 |