title: R round to nearest .5 or .1
body: <p>I have a data set of stock prices that have already been rounded to 2 decimal places <code>(1234.56)</code>.  I am now trying to round to a specific value which is different for each stock.  Here are some examples:</p>
  
  <pre><code>Current Stock Price         Minimum Tick Increment       Desired Output
    123.45                            .50                      123.50
    155.03                            .10                      155.00
    138.24                            .50                      138.00
    129.94                            .10                      129.90
     ...                              ...                       ...
  </code></pre>
  
  <p>I'm not really sure how to do this but am open to suggestions.</p>