title: R - Sorting by date periods (like 5y, 10d )
body: <p>Is there a way to sort data by date periods. For eg </p>
  
  <pre><code>myCurve &lt;- data.table( Term=c('10y', '3y', '5y'), value = c(2, 1.25, 1.9))
  </code></pre>
  
  <p>I would like to get the data sorted by Term so that the results are like so</p>
  
  <pre><code>Term  Value
  3y    1.25
  5y    1.90
  10y   2.00
  </code></pre>
  
  <p>Term could be d,w,m,y etc. </p>