title: Lengths of breaks and labels differ R convert numerical months into factors
body: <p>I've worked with cut() function in simple cases, but this is the first time I need to convert numerical numbers [1 up to 12] into labels as factors in an additional column of my data frame.</p>
  
  <pre><code>labs &lt;- c("Jan", "Feb", "Mar", "Apr", "May", "June", "Jul","Aug", "Sept", "Oct","Nov","Dec")
  length(labs) #12
  sequence = c(1,2,3,4,5,6,7,8,9,10,11,12)
  length(sequence) #12
  months_df$Month &lt;- cut(months_df$NumericMonth,breaks = sequence,labels = labs)
  </code></pre>
  
  <p>Selecting column of NumericMonth and CompleteDate </p>
  
  <pre><code> Ind NumericMonth CompleteDate
    9     2         1999-02-19        
   15     1         1999-01-08        
   38     6         1998-06-12        
   61     1         1999-01-08        
   76     5         1998-05-01        
   115    5         1998-05-15        
   124    7         1998-07-11        
  </code></pre>
  
  <p><strong>Error:</strong><br>
  Error in cut.default(months_df$NumericMonth, breaks = sequence, labels = labs) : 
    lengths of 'breaks' and 'labels' differ</p>
  
  <p><strong>Output I want</strong></p>
  
  <p>A new column with months as factors (with labels) based on NumericMonth</p>
  
  <p>How can I convert numeric months into factors with labels?</p>