title: Change Duration from (Years and Month) to (Month) in R
body: <p>I have some data frame like below. I need to add a &quot;Duration&quot; column beside the &quot;Years and Month&quot; column and convert the &quot;Years and Month&quot; to Month as duration.</p>
  <p>For instance, I need to change the 2Y3M to 27M.</p>
  <p>I have searched for it and didn't succeed. How do I do that? Thanks in advance.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Years and Month</th>
  <th>Percentage Change</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>2Y3M</td>
  <td>13%</td>
  </tr>
  <tr>
  <td>3Y4M</td>
  <td>23%</td>
  </tr>
  </tbody>
  </table>
  </div>