powered by
This selection helper selects the variables for which a function returns TRUE.
TRUE
where(fn)
A vector of integer column positions which are the result of the fn evaluation.
integer
fn
A function that returns TRUE or FALSE.
FALSE
select_helpers
iris %>% select(where(is.numeric)) iris %>% select(where(function(x) is.numeric(x))) iris %>% select(where(function(x) is.numeric(x) && mean(x) > 3.5))
Run the code above in your browser using DataLab