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))
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))