Using the mtcars dataset, find car(s) within the top quartile in MPG, bottom quartile in weight, and 5 gears.
I know the answer it just codes not fitting in.
data.frame(mtcars)
mtcars %>% filter(gear>=5)
mtcars[mtcars$wt == min(mtcars$wt), "wt", drop = FALSE]
pls suggest
First extract the max value of the bottom quartile for weigt, and the min value of the upper quartile for mpg, then filter for all 3 conditions.