title: Create new column in R data frame based on grouping of other column
body: <p>Using <code>mtcars</code> from the <code>datasets</code> package, I want to added an addition column that is created from <code>mtcars$mpg</code>, such that:</p>
  
  <pre><code>If mtcars$mpg &gt;=15 and &lt;19 then "Good"
  If mtcars$mpg &gt;=19 and &lt;27 then "Average"
  If mtcars$mpg &gt;=27 then "Bad"
  </code></pre>