I have a dataframe:
Alix Blim Jux Gyno 0.105 0.234 0.67 0.89 0.01 0.542 0.11 0.65 0.003 0.002 0.6 0.67 0.009 0.123 0.09 0.01
here is a base R option with Filter
base R
Filter
Filter(function(x) any(x > 0.6), df) # Jux Gyno #1 0.67 0.89 #2 0.11 0.65 #3 0.60 0.67 #4 0.09 0.01
Or using transmute_if
transmute_if
library(dplyr) df %>% transmute_if(~ any(.x > 0.6), I)
Or with keep
keep
library(purrr) keep(df, map_lgl(df, ~ any(.x > 0.6)))