tests/testthat/_snaps/cols_align_decimal.md

Decimal alignment works in the basic case

Code
  render_as_html(gt_tbl)
Output
  [1] "<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n  <thead>\n    <tr class=\"gt_col_headings\">\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"char\">char</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"num\">num</th>\n    </tr>\n  </thead>\n  <tbody class=\"gt_table_body\">\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">A</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    1.2  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">B</td>\n<td headers=\"num\" class=\"gt_row gt_right\">  −33.52 </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">C</td>\n<td headers=\"num\" class=\"gt_row gt_right\">9,023.2  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">D</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> −283.527</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">E</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">F</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    0.401</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">G</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> −123.1  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">H</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">I</td>\n<td headers=\"num\" class=\"gt_row gt_right\">   41    </td></tr>\n  </tbody>\n  \n  \n</table>"
Code
  render_as_html(gt_tbl)
Output
  [1] "<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n  <thead>\n    <tr class=\"gt_col_headings\">\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"char\">char</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"num\">num</th>\n    </tr>\n  </thead>\n  <tbody class=\"gt_table_body\">\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">A</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    1.2  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">B</td>\n<td headers=\"num\" class=\"gt_row gt_right\">  −33.52 </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">C</td>\n<td headers=\"num\" class=\"gt_row gt_right\">9,023.2  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">D</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> −283.527</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">E</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">F</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    0.401</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">G</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> −123.1  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">H</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">I</td>\n<td headers=\"num\" class=\"gt_row gt_right\">   41.   </td></tr>\n  </tbody>\n  \n  \n</table>"
Code
  render_as_html(gt_tbl)
Output
  [1] "<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n  <thead>\n    <tr class=\"gt_col_headings\">\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"char\">char</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"num\">num</th>\n    </tr>\n  </thead>\n  <tbody class=\"gt_table_body\">\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">A</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    1.2%  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">B</td>\n<td headers=\"num\" class=\"gt_row gt_right\">  −33.52% </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">C</td>\n<td headers=\"num\" class=\"gt_row gt_right\">9,023.2%  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">D</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> −283.527%</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">E</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">F</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    0.401%</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">G</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> −123.1%  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">H</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">I</td>\n<td headers=\"num\" class=\"gt_row gt_right\">  41 %   </td></tr>\n  </tbody>\n  \n  \n</table>"
Code
  render_as_html(gt_tbl)
Output
  [1] "<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n  <thead>\n    <tr class=\"gt_col_headings\">\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"char\">char</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"num\">num</th>\n    </tr>\n  </thead>\n  <tbody class=\"gt_table_body\">\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">A</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    1.2%  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">B</td>\n<td headers=\"num\" class=\"gt_row gt_right\">  −33.52% </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">C</td>\n<td headers=\"num\" class=\"gt_row gt_right\">9,023.2%  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">D</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> −283.527%</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">E</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">F</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    0.401%</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">G</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> −123.1%  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">H</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">I</td>\n<td headers=\"num\" class=\"gt_row gt_right\">   41.%   </td></tr>\n  </tbody>\n  \n  \n</table>"
Code
  render_as_html(gt_tbl)
Output
  [1] "<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n  <thead>\n    <tr class=\"gt_col_headings\">\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"char\">char</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"num\">num</th>\n    </tr>\n  </thead>\n  <tbody class=\"gt_table_body\">\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">A</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    1.2‰  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">B</td>\n<td headers=\"num\" class=\"gt_row gt_right\">  −33.52‰ </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">C</td>\n<td headers=\"num\" class=\"gt_row gt_right\">9,023.2‰  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">D</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> −283.527‰</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">E</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">F</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    0.401‰</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">G</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> −123.1‰  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">H</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">I</td>\n<td headers=\"num\" class=\"gt_row gt_right\">  41 ‰   </td></tr>\n  </tbody>\n  \n  \n</table>"
Code
  render_as_html(gt_tbl)
Output
  [1] "<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n  <thead>\n    <tr class=\"gt_col_headings\">\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"char\">char</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"num\">num</th>\n    </tr>\n  </thead>\n  <tbody class=\"gt_table_body\">\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">A</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    1.2‰  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">B</td>\n<td headers=\"num\" class=\"gt_row gt_right\">  −33.52‰ </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">C</td>\n<td headers=\"num\" class=\"gt_row gt_right\">9,023.2‰  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">D</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> −283.527‰</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">E</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">F</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    0.401‰</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">G</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> −123.1‰  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">H</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">I</td>\n<td headers=\"num\" class=\"gt_row gt_right\">   41.‰   </td></tr>\n  </tbody>\n  \n  \n</table>"
Code
  render_as_html(gt_tbl)
Output
  [1] "<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n  <thead>\n    <tr class=\"gt_col_headings\">\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"char\">char</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"num\">num</th>\n    </tr>\n  </thead>\n  <tbody class=\"gt_table_body\">\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">A</td>\n<td headers=\"num\" class=\"gt_row gt_right\">     1.2 ppm  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">B</td>\n<td headers=\"num\" class=\"gt_row gt_right\">   −33.52 ppm </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">C</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> 9,023.2 ppm  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">D</td>\n<td headers=\"num\" class=\"gt_row gt_right\">  −283.527 ppm</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">E</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">F</td>\n<td headers=\"num\" class=\"gt_row gt_right\">     0.401 ppm</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">G</td>\n<td headers=\"num\" class=\"gt_row gt_right\">  −123.1 ppm  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">H</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">I</td>\n<td headers=\"num\" class=\"gt_row gt_right\">41  ppm   </td></tr>\n  </tbody>\n  \n  \n</table>"
Code
  render_as_html(gt_tbl)
Output
  [1] "<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n  <thead>\n    <tr class=\"gt_col_headings\">\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"char\">char</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"num\">num</th>\n    </tr>\n  </thead>\n  <tbody class=\"gt_table_body\">\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">A</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    1.2 ppm  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">B</td>\n<td headers=\"num\" class=\"gt_row gt_right\">  −33.52 ppm </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">C</td>\n<td headers=\"num\" class=\"gt_row gt_right\">9,023.2 ppm  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">D</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> −283.527 ppm</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">E</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">F</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    0.401 ppm</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">G</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> −123.1 ppm  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">H</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">I</td>\n<td headers=\"num\" class=\"gt_row gt_right\">   41. ppm   </td></tr>\n  </tbody>\n  \n  \n</table>"
Code
  render_as_html(gt_tbl)
Output
  [1] "<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n  <thead>\n    <tr class=\"gt_col_headings\">\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"num\">num</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"char\">char</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"fctr\">fctr</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"date\">date</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"time\">time</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"datetime\">datetime</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"currency\">currency</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"row\">row</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"group\">group</th>\n    </tr>\n  </thead>\n  <tbody class=\"gt_table_body\">\n    <tr><td headers=\"num\" class=\"gt_row gt_right\">1.111e-01</td>\n<td headers=\"char\" class=\"gt_row gt_left\">apricot</td>\n<td headers=\"fctr\" class=\"gt_row gt_center\">one</td>\n<td headers=\"date\" class=\"gt_row gt_right\">2015-01-15</td>\n<td headers=\"time\" class=\"gt_row gt_right\">13:35</td>\n<td headers=\"datetime\" class=\"gt_row gt_right\">2018-01-01 02:22</td>\n<td headers=\"currency\" class=\"gt_row gt_right\">   49.950</td>\n<td headers=\"row\" class=\"gt_row gt_left\">row_1</td>\n<td headers=\"group\" class=\"gt_row gt_left\">grp_a</td></tr>\n    <tr><td headers=\"num\" class=\"gt_row gt_right\">2.222e+00</td>\n<td headers=\"char\" class=\"gt_row gt_left\">banana</td>\n<td headers=\"fctr\" class=\"gt_row gt_center\">two</td>\n<td headers=\"date\" class=\"gt_row gt_right\">2015-02-15</td>\n<td headers=\"time\" class=\"gt_row gt_right\">14:40</td>\n<td headers=\"datetime\" class=\"gt_row gt_right\">2018-02-02 14:33</td>\n<td headers=\"currency\" class=\"gt_row gt_right\">   17.950</td>\n<td headers=\"row\" class=\"gt_row gt_left\">row_2</td>\n<td headers=\"group\" class=\"gt_row gt_left\">grp_a</td></tr>\n    <tr><td headers=\"num\" class=\"gt_row gt_right\">3.333e+01</td>\n<td headers=\"char\" class=\"gt_row gt_left\">coconut</td>\n<td headers=\"fctr\" class=\"gt_row gt_center\">three</td>\n<td headers=\"date\" class=\"gt_row gt_right\">2015-03-15</td>\n<td headers=\"time\" class=\"gt_row gt_right\">15:45</td>\n<td headers=\"datetime\" class=\"gt_row gt_right\">2018-03-03 03:44</td>\n<td headers=\"currency\" class=\"gt_row gt_right\">    1.390</td>\n<td headers=\"row\" class=\"gt_row gt_left\">row_3</td>\n<td headers=\"group\" class=\"gt_row gt_left\">grp_a</td></tr>\n    <tr><td headers=\"num\" class=\"gt_row gt_right\">4.444e+02</td>\n<td headers=\"char\" class=\"gt_row gt_left\">durian</td>\n<td headers=\"fctr\" class=\"gt_row gt_center\">four</td>\n<td headers=\"date\" class=\"gt_row gt_right\">2015-04-15</td>\n<td headers=\"time\" class=\"gt_row gt_right\">16:50</td>\n<td headers=\"datetime\" class=\"gt_row gt_right\">2018-04-04 15:55</td>\n<td headers=\"currency\" class=\"gt_row gt_right\">65100.000</td>\n<td headers=\"row\" class=\"gt_row gt_left\">row_4</td>\n<td headers=\"group\" class=\"gt_row gt_left\">grp_a</td></tr>\n    <tr><td headers=\"num\" class=\"gt_row gt_right\">5.550e+03</td>\n<td headers=\"char\" class=\"gt_row gt_left\">NA</td>\n<td headers=\"fctr\" class=\"gt_row gt_center\">five</td>\n<td headers=\"date\" class=\"gt_row gt_right\">2015-05-15</td>\n<td headers=\"time\" class=\"gt_row gt_right\">17:55</td>\n<td headers=\"datetime\" class=\"gt_row gt_right\">2018-05-05 04:00</td>\n<td headers=\"currency\" class=\"gt_row gt_right\"> 1325.810</td>\n<td headers=\"row\" class=\"gt_row gt_left\">row_5</td>\n<td headers=\"group\" class=\"gt_row gt_left\">grp_b</td></tr>\n    <tr><td headers=\"num\" class=\"gt_row gt_right\">NA</td>\n<td headers=\"char\" class=\"gt_row gt_left\">fig</td>\n<td headers=\"fctr\" class=\"gt_row gt_center\">six</td>\n<td headers=\"date\" class=\"gt_row gt_right\">2015-06-15</td>\n<td headers=\"time\" class=\"gt_row gt_right\">NA</td>\n<td headers=\"datetime\" class=\"gt_row gt_right\">2018-06-06 16:11</td>\n<td headers=\"currency\" class=\"gt_row gt_right\">   13.255</td>\n<td headers=\"row\" class=\"gt_row gt_left\">row_6</td>\n<td headers=\"group\" class=\"gt_row gt_left\">grp_b</td></tr>\n    <tr><td headers=\"num\" class=\"gt_row gt_right\">7.770e+05</td>\n<td headers=\"char\" class=\"gt_row gt_left\">grapefruit</td>\n<td headers=\"fctr\" class=\"gt_row gt_center\">seven</td>\n<td headers=\"date\" class=\"gt_row gt_right\">NA</td>\n<td headers=\"time\" class=\"gt_row gt_right\">19:10</td>\n<td headers=\"datetime\" class=\"gt_row gt_right\">2018-07-07 05:22</td>\n<td headers=\"currency\" class=\"gt_row gt_right\">NA</td>\n<td headers=\"row\" class=\"gt_row gt_left\">row_7</td>\n<td headers=\"group\" class=\"gt_row gt_left\">grp_b</td></tr>\n    <tr><td headers=\"num\" class=\"gt_row gt_right\">8.880e+06</td>\n<td headers=\"char\" class=\"gt_row gt_left\">honeydew</td>\n<td headers=\"fctr\" class=\"gt_row gt_center\">eight</td>\n<td headers=\"date\" class=\"gt_row gt_right\">2015-08-15</td>\n<td headers=\"time\" class=\"gt_row gt_right\">20:20</td>\n<td headers=\"datetime\" class=\"gt_row gt_right\">NA</td>\n<td headers=\"currency\" class=\"gt_row gt_right\">    0.440</td>\n<td headers=\"row\" class=\"gt_row gt_left\">row_8</td>\n<td headers=\"group\" class=\"gt_row gt_left\">grp_b</td></tr>\n  </tbody>\n  \n  \n</table>"
Code
  render_as_html(gt_tbl)
Output
  [1] "<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n  <thead>\n    <tr class=\"gt_col_headings\">\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"char\">char</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"num\">num</th>\n    </tr>\n  </thead>\n  <tbody class=\"gt_table_body\">\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">A</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    abc1.2%def  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">B</td>\n<td headers=\"num\" class=\"gt_row gt_right\">  abc−33.52%def </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">C</td>\n<td headers=\"num\" class=\"gt_row gt_right\">abc9,023.2%def  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">D</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> abc−283.527%def</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">E</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">F</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    abc0.401%def</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">G</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> abc−123.1%def  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">H</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">I</td>\n<td headers=\"num\" class=\"gt_row gt_right\">   abc41.%def   </td></tr>\n  </tbody>\n  \n  \n</table>"
Code
  render_as_html(gt_tbl)
Output
  [1] "<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n  <thead>\n    <tr class=\"gt_col_headings\">\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"char\">char</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"num\">num</th>\n    </tr>\n  </thead>\n  <tbody class=\"gt_table_body\">\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">A</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    1.2   </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">B</td>\n<td headers=\"num\" class=\"gt_row gt_right\">  (33.52)  </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">C</td>\n<td headers=\"num\" class=\"gt_row gt_right\">9,023.2   </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">D</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> (283.527) </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">E</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">F</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    0.401 </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">G</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> (123.1)   </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">H</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">I</td>\n<td headers=\"num\" class=\"gt_row gt_right\">   41.    </td></tr>\n  </tbody>\n  \n  \n</table>"
Code
  render_as_html(gt_tbl)
Output
  [1] "<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n  <thead>\n    <tr class=\"gt_col_headings\">\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"char\">char</th>\n      <th class=\"gt_col_heading gt_columns_bottom_border gt_right\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"num\">num</th>\n    </tr>\n  </thead>\n  <tbody class=\"gt_table_body\">\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">A</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    $1 </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">B</td>\n<td headers=\"num\" class=\"gt_row gt_right\"> ($34)</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">C</td>\n<td headers=\"num\" class=\"gt_row gt_right\">$9,023 </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">D</td>\n<td headers=\"num\" class=\"gt_row gt_right\">($284)</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">E</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">F</td>\n<td headers=\"num\" class=\"gt_row gt_right\">    $0 </td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">G</td>\n<td headers=\"num\" class=\"gt_row gt_right\">($123)</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">H</td>\n<td headers=\"num\" class=\"gt_row gt_right\">NA</td></tr>\n    <tr><td headers=\"char\" class=\"gt_row gt_left\">I</td>\n<td headers=\"num\" class=\"gt_row gt_right\">   $41 </td></tr>\n  </tbody>\n  \n  \n</table>"


rstudio/gt documentation built on Nov. 2, 2024, 5:53 p.m.