title: Assign a factor vector with more than 2 levels/labels for a given numeric numeric vector
body: <p>everybody. I hope that you would help me to solve my query.
  For a vector representing the price ($) of apples say,</p>
  
  <pre><code>apple &lt;- c(23, 26, 54, 34, 34, 34, 98, 23, 4, 34, 098, 45, 93, 20, 39, 83, 78, 34, 09, 8, 56, 98, 99, 62, 29)
  </code></pre>
  
  <p>I can assign a factor vector that represents whether it is "cheap" if apples cost less than $50 and "expensive" if apple cost more than or equal to $50. For instance, the factor variable could easily be assigned as: </p>
  
  <pre><code>price &lt;- factor(apple&gt;50, labels = c("cheap", "expensive"))
  </code></pre>
  
  <p>However, I am clueless of assigning a factor variable with three levels of price say cheap, moderate, and expensive, say when apples are said to be of a moderate price if they cost between $30 and $40.
  Thank you </p>