in dplyr , if_any() failed in across

  Kiến thức lập trình

I want to filter the rows which all given variables value > 2.5 (I mean the varibles xyz). Below code failed, anyone can help ? Thanks!

library(tidyverse)
data("diamonds")
diamonds %>% filter(across(where(is.double), ~ if_all(.)>2.5))

LEAVE A COMMENT