title: Convert string into Date value in R
body: <p>I have a array containing date values in a unusual way.</p>
  
  <pre><code>datevalue &lt;- c("6m6d", "6m10d","12m31d")
  </code></pre>
  
  <p>"m" stands for: month, "d" stands for: day
  I want to convert it into 4 digits date value for further calculation.</p>
  
  <p><code>6m6d : 0606</code></p>
  
  <p><code>6m10d : 0610</code></p>
  
  <p><code>12m31d : 1231</code></p>
  
  <p>Any suggestions are welcome, thanks a lot!</p>