I'm trying to remove the upper and lower quintiles from a data set. I can see there is a quartile
function but not one for quintiles.
Any advice on how to do this?
I'm trying to remove the upper and lower quintiles from a data set. I can see there is a quartile
function but not one for quintiles.
Any advice on how to do this?
df <- df[quantile(df$x, probs = c(.2)) < x & x < quantile(x, probs = c(.8)),]