title: R: Classify numeric vector in factor groups
body: <p>I have a numeric variable age: </p>
  
  <pre><code>age &lt;- ceiling(runif(1000, 1, 99))
  </code></pre>
  
  <p>I want to create a factor variable with levels distinguishing </p>
  
  <ul>
  <li>25 years or under  </li>
  <li>26 to 35 years</li>
  <li>36 to 45 years</li>
  <li>46 to 55 years</li>
  <li>56 to 65 years</li>
  <li>66 to 75 years</li>
  <li>76 years or over. </li>
  </ul>
  
  <p>I've tried to use the cut function </p>
  
  <pre><code>age &lt;-cut(age, breaks = seq(26, 77, by = 9))
  </code></pre>
  
  <p>but I don't get the desired result. 
  Thank you in advance for your help </p>