<!DOCTYPE html> 
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>tinytable</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
.table td.tinytable, .table th.tinytable {    border-bottom: solid 0.1em #d3d8dc; }
.table td.tinytable, .table th.tinytable {    text-align: left; }
.table td.tinytable, .table th.tinytable {    text-align: center; }
    </style>
    <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
    <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
    <script>
    MathJax = {
      tex: {
        inlineMath: [['$', '$'], ['\\(', '\\)']]
      },
      svg: {
        fontCache: 'global'
      }
    };
    </script>
  </head>

  <body>
    <div class="container">
      <table class="table table-borderless" id="tinytable" style="width: auto; margin-left: auto; margin-right: auto;" data-quarto-disable-processing='true'>
        <thead>
        
              <tr>
                <th scope="col"> </th>
                <th scope="col">(1)</th>
              </tr>
        </thead>
        
        <tbody>
                <tr>
                  <td>(Intercept)</td>
                  <td>324.082 </td>
                </tr>
                <tr>
                  <td>           </td>
                  <td>(27.433)</td>
                </tr>
                <tr>
                  <td>mpg        </td>
                  <td>-8.830  </td>
                </tr>
                <tr>
                  <td>           </td>
                  <td>(1.310) </td>
                </tr>
        </tbody>
      </table>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    <script>
      function tinytable(i, j, css_id) {
        var table = document.getElementById("tinytable");
        table.rows[i].cells[j].classList.add(css_id);
      }
      function insertSpanRow(i, colspan, content) {
        var table = document.getElementById('tinytable');
        var newRow = table.insertRow(i);
        var newCell = newRow.insertCell(0);
        newCell.setAttribute("colspan", colspan);
        // newCell.innerText = content;
        // this may be unsafe, but innerText does not interpret <br>
        newCell.innerHTML = content;
      }
      function spanCell_tinytable(i, j, rowspan, colspan) {
        var table = document.getElementById("tinytable");
        const targetRow = table.rows[i];
        const targetCell = targetRow.cells[j];
        for (let r = 0; r < rowspan; r++) {
          // Only start deleting cells to the right for the first row (r == 0)
          if (r === 0) {
            // Delete cells to the right of the target cell in the first row
            for (let c = colspan - 1; c > 0; c--) {
              if (table.rows[i + r].cells[j + c]) {
                table.rows[i + r].deleteCell(j + c);
              }
            }
          }
          // For rows below the first, delete starting from the target column
          if (r > 0) {
            for (let c = colspan - 1; c >= 0; c--) {
              if (table.rows[i + r] && table.rows[i + r].cells[j]) {
                table.rows[i + r].deleteCell(j);
              }
            }
          }
        }
        // Set rowspan and colspan of the target cell
        targetCell.rowSpan = rowspan;
        targetCell.colSpan = colspan;
      }

window.addEventListener('load', function () { tinytable(0, 0, 'tinytable') })
window.addEventListener('load', function () { tinytable(0, 1, 'tinytable') })
window.addEventListener('load', function () { tinytable(0, 0, 'tinytable') })
window.addEventListener('load', function () { tinytable(1, 0, 'tinytable') })
window.addEventListener('load', function () { tinytable(2, 0, 'tinytable') })
window.addEventListener('load', function () { tinytable(3, 0, 'tinytable') })
window.addEventListener('load', function () { tinytable(4, 0, 'tinytable') })
window.addEventListener('load', function () { tinytable(0, 1, 'tinytable') })
window.addEventListener('load', function () { tinytable(1, 1, 'tinytable') })
window.addEventListener('load', function () { tinytable(2, 1, 'tinytable') })
window.addEventListener('load', function () { tinytable(3, 1, 'tinytable') })
window.addEventListener('load', function () { tinytable(4, 1, 'tinytable') })
    </script>

  </body>

</html>
