title: how i can apply which.min function conditionally
body: <p>I want to create a column in dataframe  and populate minimum value in the data frame in column A condition is met :</p>
  
  <pre><code>**Sample data** 
  Variable value
  A         10
  A         20
  A         30
  B         5
  B         60
  B         70
  </code></pre>
  
  <p><strong>Expected Result :</strong></p>
  
  <pre><code>Variable value   NewColumn
  A         10     min
  A         20     between min to 20
  A         30     between 21 to 30
  B         5      min
  B         60     between 50 to 60
  </code></pre>
  
  <p>Is there any easy way to achieve this ?</p>