title: Format Date (Year-Month) in R
body: <p>Is it possible to format the following number to Year-Month
  I entries as follows:</p>
  
  <p>1402
  1401
  1312</p>
  
  <p>Meaning February 2014. January 2014 and December 2013.</p>
  
  <p>I tried:</p>
  
  <pre><code>date &lt;- 1402
  date &lt;- as.Date(as.character(date), format = "%y%m")
  </code></pre>
  
  <p>But I get an NA as an output.</p>