I want to subset or filter a data frame to keep only the rows with cut == "Good, when the 20% of the price is greater than the value of price_02. How can I do that?
d_01 <- diamonds |>
filter(cut == "Good" | cut == "Premium", carat == 0.29) |>
dplyr::select(carat, cut, price) |>
slice(1:10) |>
mutate(price_02 = c(800, 760, 779, 738, 789, 750, 740, 779, 748, 789))
d_01