title: How to insert a character at a certain position in all rows using R
body: <p>Hey I have a column of birth dates in this format:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>dob</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>19881011</td>
  </tr>
  <tr>
  <td>19590223</td>
  </tr>
  <tr>
  <td>19860407</td>
  </tr>
  <tr>
  <td>19710921</td>
  </tr>
  <tr>
  <td>19640213</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I need to edit the column to this format:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>dob</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1988-10-11</td>
  </tr>
  <tr>
  <td>1959-02-23</td>
  </tr>
  <tr>
  <td>1986-04-07</td>
  </tr>
  <tr>
  <td>1971-09-21</td>
  </tr>
  <tr>
  <td>1964-02-13</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I came across similar problems being solved with gsub and regex but was able to apply it to my problem. Can someone recommend a solution?</p>