-1

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?

Con Des
  • 359
  • 1
  • 2
  • 9
  • Are you after `quantile`? – kangaroo_cliff Nov 25 '20 at 04:02
  • No, I want to remove the upper and lower quintiles. – Con Des Nov 25 '20 at 04:07
  • Please add data using `dput` or something that we can copy and use. Also show expected output for the data shared. Read about [how to ask a good question](http://stackoverflow.com/help/how-to-ask) and [how to give a reproducible example](http://stackoverflow.com/questions/5963269). – Ronak Shah Nov 25 '20 at 04:09

1 Answers1

1
df <- df[quantile(df$x, probs = c(.2)) < x & x < quantile(x, probs = c(.8)),]
Austin Graves
  • 1,044
  • 5
  • 12