title: How to select a range of data from a column in a data frame such as the interquartile range?
body: <p>Say I have a data frame df containing a column "A" taking real values. I know I can select only this column from the data frame and I know some commands to extract certain data from it e.g.</p>
  
  <p><code>df.A = df[df$A &gt; 5 &amp; df$A &lt; 10, c("A")]</code></p>
  
  <p>However, how would I select for example the interquartile range, and more generally take the column minus the smallest X percent and largest Y percent of the values?</p>
  
  <p>Cheers</p>