title: simples solution to subset max data with multiple condition passed
body: <p>I want to subset data from data frame with multiple conditions where one of them is <code>max</code> or <code>min</code>. Here is what i mean with use of <code>mtcars</code>:</p>
  
  <p><code>mtcars[mtcars$qsec==max(mtcars$qsec),]</code></p>
  
  <p>output is:</p>
  
  <pre><code>          mpg cyl  disp hp drat   wt qsec vs am gear carb
  Merc 230 22.8   4 140.8 95 3.92 3.15 22.9  1  0    4    2
  </code></pre>
  
  <p>now I want to get fastest car (<code>mtcars$qsec==max(mtcars$qsec)</code>) but only from cars that have 5 gears or more:</p>
  
  <p><code>mtcars[mtcars$gear&gt;=5 &amp; mtcars$qsec==max(mtcars$qsec),]</code></p>
  
  <p>The output is empty table... </p>
  
  <p>BEFORE YOU ANSWER: I can find a way to solve this by myself, for example doing this:</p>
  
  <pre><code>my_mtcars=mtcars[mtcars$gear&gt;=5,]
  my_mtcars[my_mtcars$qsec==max(my_mtcars$qsec),]
  </code></pre>
  
  <p>out:</p>
  
  <pre><code>              mpg cyl disp  hp drat    wt qsec vs am gear carb
  Lotus Europa 30.4   4 95.1 113 3.77 1.513 16.9  1  1    5    2
  </code></pre>
  
  <p>However, in this particular situation code simplicity is most crucial factor for me. Can you propose any solution that can be done in one line of code and do not include anything more complex? Is this even possible?</p>