The tbl_split_by_rows() and tbl_split_by_columns() functions split a single
gtsummary table into multiple tables.
Both column-wise splitting (that is, splits by columns in
x$table_body) and row-wise splitting is possible.
tbl_split_by_rows(
x,
variables = NULL,
row_numbers = NULL,
footnotes = c("all", "first", "last"),
caption = c("all", "first", "last")
)
tbl_split_by_columns(
x,
keys,
groups,
footnotes = c("all", "first", "last"),
caption = c("all", "first", "last")
)
# S3 method for class 'tbl_split'
print(x, ...)(gtsummary or list)
gtsummary table.
(tidy-select or integer)
variables or row numbers at which to split the gtsummary table rows (tables
will be separated after each of these variables).
(string)
can be either "first", "all", or "last", to locate global footnotes or
caption only on the first, in each, or in the last table, respectively. It defaults
to "all". Reference footnotes are always present wherever they appear.
(tidy-select)
columns to be repeated in each table split. It defaults to the first column
if missing (usually label column).
(list of character vectors)
list of column names that appear in x$table_body.
Each group of column names represent a different table in the output list.
These dots are for future extensions and must be empty.
tbl_split object. If multiple splits are performed (e.g., both by
row and columns), the output is returned a single level list.
Run show_header_names() to print all column names to split by.
Footnotes and caption handling are experimental and may change in the future.
row_numbers indicates the row numbers at which to split the table. It means
that the table will be split after each of these row numbers. If the last
row is selected, the split will not happen as it is supposed to happen after
the last row.
# Example 1 ----------------------------------
# Split by rows
trial |>
tbl_summary(by = trt) |>
tbl_split_by_rows(variables = c(marker, grade)) |>
tail(n = 1) # Print only last table for simplicity
#> [[1]]
#> <div id="fcttvcogvf" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
#> <style>#fcttvcogvf table {
#> font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
#> -webkit-font-smoothing: antialiased;
#> -moz-osx-font-smoothing: grayscale;
#> }
#>
#> #fcttvcogvf thead, #fcttvcogvf tbody, #fcttvcogvf tfoot, #fcttvcogvf tr, #fcttvcogvf td, #fcttvcogvf th {
#> border-style: none;
#> }
#>
#> #fcttvcogvf p {
#> margin: 0;
#> padding: 0;
#> }
#>
#> #fcttvcogvf .gt_table {
#> display: table;
#> border-collapse: collapse;
#> line-height: normal;
#> margin-left: auto;
#> margin-right: auto;
#> color: #333333;
#> font-size: 16px;
#> font-weight: normal;
#> font-style: normal;
#> background-color: #FFFFFF;
#> width: auto;
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #A8A8A8;
#> border-right-style: none;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #A8A8A8;
#> border-left-style: none;
#> border-left-width: 2px;
#> border-left-color: #D3D3D3;
#> }
#>
#> #fcttvcogvf .gt_caption {
#> padding-top: 4px;
#> padding-bottom: 4px;
#> }
#>
#> #fcttvcogvf .gt_title {
#> color: #333333;
#> font-size: 125%;
#> font-weight: initial;
#> padding-top: 4px;
#> padding-bottom: 4px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-bottom-color: #FFFFFF;
#> border-bottom-width: 0;
#> }
#>
#> #fcttvcogvf .gt_subtitle {
#> color: #333333;
#> font-size: 85%;
#> font-weight: initial;
#> padding-top: 3px;
#> padding-bottom: 5px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-top-color: #FFFFFF;
#> border-top-width: 0;
#> }
#>
#> #fcttvcogvf .gt_heading {
#> background-color: #FFFFFF;
#> text-align: center;
#> border-bottom-color: #FFFFFF;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #fcttvcogvf .gt_bottom_border {
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #fcttvcogvf .gt_col_headings {
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #fcttvcogvf .gt_col_heading {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: normal;
#> text-transform: inherit;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> vertical-align: bottom;
#> padding-top: 5px;
#> padding-bottom: 6px;
#> padding-left: 5px;
#> padding-right: 5px;
#> overflow-x: hidden;
#> }
#>
#> #fcttvcogvf .gt_column_spanner_outer {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: normal;
#> text-transform: inherit;
#> padding-top: 0;
#> padding-bottom: 0;
#> padding-left: 4px;
#> padding-right: 4px;
#> }
#>
#> #fcttvcogvf .gt_column_spanner_outer:first-child {
#> padding-left: 0;
#> }
#>
#> #fcttvcogvf .gt_column_spanner_outer:last-child {
#> padding-right: 0;
#> }
#>
#> #fcttvcogvf .gt_column_spanner {
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> vertical-align: bottom;
#> padding-top: 5px;
#> padding-bottom: 5px;
#> overflow-x: hidden;
#> display: inline-block;
#> width: 100%;
#> }
#>
#> #fcttvcogvf .gt_spanner_row {
#> border-bottom-style: hidden;
#> }
#>
#> #fcttvcogvf .gt_group_heading {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> text-transform: inherit;
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> vertical-align: middle;
#> text-align: left;
#> }
#>
#> #fcttvcogvf .gt_empty_group_heading {
#> padding: 0.5px;
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> vertical-align: middle;
#> }
#>
#> #fcttvcogvf .gt_from_md > :first-child {
#> margin-top: 0;
#> }
#>
#> #fcttvcogvf .gt_from_md > :last-child {
#> margin-bottom: 0;
#> }
#>
#> #fcttvcogvf .gt_row {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> margin: 10px;
#> border-top-style: solid;
#> border-top-width: 1px;
#> border-top-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> vertical-align: middle;
#> overflow-x: hidden;
#> }
#>
#> #fcttvcogvf .gt_stub {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> text-transform: inherit;
#> border-right-style: solid;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #fcttvcogvf .gt_stub_row_group {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> text-transform: inherit;
#> border-right-style: solid;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> padding-left: 5px;
#> padding-right: 5px;
#> vertical-align: top;
#> }
#>
#> #fcttvcogvf .gt_row_group_first td {
#> border-top-width: 2px;
#> }
#>
#> #fcttvcogvf .gt_row_group_first th {
#> border-top-width: 2px;
#> }
#>
#> #fcttvcogvf .gt_summary_row {
#> color: #333333;
#> background-color: #FFFFFF;
#> text-transform: inherit;
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #fcttvcogvf .gt_first_summary_row {
#> border-top-style: solid;
#> border-top-color: #D3D3D3;
#> }
#>
#> #fcttvcogvf .gt_first_summary_row.thick {
#> border-top-width: 2px;
#> }
#>
#> #fcttvcogvf .gt_last_summary_row {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #fcttvcogvf .gt_grand_summary_row {
#> color: #333333;
#> background-color: #FFFFFF;
#> text-transform: inherit;
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #fcttvcogvf .gt_first_grand_summary_row {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-top-style: double;
#> border-top-width: 6px;
#> border-top-color: #D3D3D3;
#> }
#>
#> #fcttvcogvf .gt_last_grand_summary_row_top {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-bottom-style: double;
#> border-bottom-width: 6px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #fcttvcogvf .gt_striped {
#> background-color: rgba(128, 128, 128, 0.05);
#> }
#>
#> #fcttvcogvf .gt_table_body {
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #fcttvcogvf .gt_footnotes {
#> color: #333333;
#> background-color: #FFFFFF;
#> border-bottom-style: none;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 2px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #fcttvcogvf .gt_footnote {
#> margin: 0px;
#> font-size: 90%;
#> padding-top: 4px;
#> padding-bottom: 4px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #fcttvcogvf .gt_sourcenotes {
#> color: #333333;
#> background-color: #FFFFFF;
#> border-bottom-style: none;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 2px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #fcttvcogvf .gt_sourcenote {
#> font-size: 90%;
#> padding-top: 4px;
#> padding-bottom: 4px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #fcttvcogvf .gt_left {
#> text-align: left;
#> }
#>
#> #fcttvcogvf .gt_center {
#> text-align: center;
#> }
#>
#> #fcttvcogvf .gt_right {
#> text-align: right;
#> font-variant-numeric: tabular-nums;
#> }
#>
#> #fcttvcogvf .gt_font_normal {
#> font-weight: normal;
#> }
#>
#> #fcttvcogvf .gt_font_bold {
#> font-weight: bold;
#> }
#>
#> #fcttvcogvf .gt_font_italic {
#> font-style: italic;
#> }
#>
#> #fcttvcogvf .gt_super {
#> font-size: 65%;
#> }
#>
#> #fcttvcogvf .gt_footnote_marks {
#> font-size: 75%;
#> vertical-align: 0.4em;
#> position: initial;
#> }
#>
#> #fcttvcogvf .gt_asterisk {
#> font-size: 100%;
#> vertical-align: 0;
#> }
#>
#> #fcttvcogvf .gt_indent_1 {
#> text-indent: 5px;
#> }
#>
#> #fcttvcogvf .gt_indent_2 {
#> text-indent: 10px;
#> }
#>
#> #fcttvcogvf .gt_indent_3 {
#> text-indent: 15px;
#> }
#>
#> #fcttvcogvf .gt_indent_4 {
#> text-indent: 20px;
#> }
#>
#> #fcttvcogvf .gt_indent_5 {
#> text-indent: 25px;
#> }
#>
#> #fcttvcogvf .katex-display {
#> display: inline-flex !important;
#> margin-bottom: 0.75em !important;
#> }
#>
#> #fcttvcogvf div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
#> height: 0px !important;
#> }
#> </style>
#> <table class="gt_table" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
#> <thead>
#> <tr class="gt_col_headings">
#> <th class="gt_col_heading gt_columns_bottom_border gt_left" rowspan="1" colspan="1" scope="col" id="label"><span class='gt_from_md'><strong>Characteristic</strong></span></th>
#> <th class="gt_col_heading gt_columns_bottom_border gt_center" rowspan="1" colspan="1" scope="col" id="stat_1"><span class='gt_from_md'><strong>Drug A</strong><br />
#> N = 98</span><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>1</sup></span></th>
#> <th class="gt_col_heading gt_columns_bottom_border gt_center" rowspan="1" colspan="1" scope="col" id="stat_2"><span class='gt_from_md'><strong>Drug B</strong><br />
#> N = 102</span><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>1</sup></span></th>
#> </tr>
#> </thead>
#> <tbody class="gt_table_body">
#> <tr><td headers="label" class="gt_row gt_left">Tumor Response</td>
#> <td headers="stat_1" class="gt_row gt_center">28 (29%)</td>
#> <td headers="stat_2" class="gt_row gt_center">33 (34%)</td></tr>
#> <tr><td headers="label" class="gt_row gt_left"> Unknown</td>
#> <td headers="stat_1" class="gt_row gt_center">3</td>
#> <td headers="stat_2" class="gt_row gt_center">4</td></tr>
#> <tr><td headers="label" class="gt_row gt_left">Patient Died</td>
#> <td headers="stat_1" class="gt_row gt_center">52 (53%)</td>
#> <td headers="stat_2" class="gt_row gt_center">60 (59%)</td></tr>
#> <tr><td headers="label" class="gt_row gt_left">Months to Death/Censor</td>
#> <td headers="stat_1" class="gt_row gt_center">23.5 (17.4, 24.0)</td>
#> <td headers="stat_2" class="gt_row gt_center">21.2 (14.5, 24.0)</td></tr>
#> </tbody>
#>
#> <tfoot class="gt_footnotes">
#> <tr>
#> <td class="gt_footnote" colspan="3"><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>1</sup></span> <span class='gt_from_md'>Median (Q1, Q3); n (%)</span></td>
#> </tr>
#> </tfoot>
#> </table>
#> </div>
#>
# Example 2 ----------------------------------
# Split by rows with row numbers
trial |>
tbl_summary(by = trt) |>
tbl_split_by_rows(row_numbers = c(5, 7)) |>
tail(n = 1) # Print only last table for simplicity
#> [[1]]
#> <div id="ticpvsghdh" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
#> <style>#ticpvsghdh table {
#> font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
#> -webkit-font-smoothing: antialiased;
#> -moz-osx-font-smoothing: grayscale;
#> }
#>
#> #ticpvsghdh thead, #ticpvsghdh tbody, #ticpvsghdh tfoot, #ticpvsghdh tr, #ticpvsghdh td, #ticpvsghdh th {
#> border-style: none;
#> }
#>
#> #ticpvsghdh p {
#> margin: 0;
#> padding: 0;
#> }
#>
#> #ticpvsghdh .gt_table {
#> display: table;
#> border-collapse: collapse;
#> line-height: normal;
#> margin-left: auto;
#> margin-right: auto;
#> color: #333333;
#> font-size: 16px;
#> font-weight: normal;
#> font-style: normal;
#> background-color: #FFFFFF;
#> width: auto;
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #A8A8A8;
#> border-right-style: none;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #A8A8A8;
#> border-left-style: none;
#> border-left-width: 2px;
#> border-left-color: #D3D3D3;
#> }
#>
#> #ticpvsghdh .gt_caption {
#> padding-top: 4px;
#> padding-bottom: 4px;
#> }
#>
#> #ticpvsghdh .gt_title {
#> color: #333333;
#> font-size: 125%;
#> font-weight: initial;
#> padding-top: 4px;
#> padding-bottom: 4px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-bottom-color: #FFFFFF;
#> border-bottom-width: 0;
#> }
#>
#> #ticpvsghdh .gt_subtitle {
#> color: #333333;
#> font-size: 85%;
#> font-weight: initial;
#> padding-top: 3px;
#> padding-bottom: 5px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-top-color: #FFFFFF;
#> border-top-width: 0;
#> }
#>
#> #ticpvsghdh .gt_heading {
#> background-color: #FFFFFF;
#> text-align: center;
#> border-bottom-color: #FFFFFF;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #ticpvsghdh .gt_bottom_border {
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #ticpvsghdh .gt_col_headings {
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #ticpvsghdh .gt_col_heading {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: normal;
#> text-transform: inherit;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> vertical-align: bottom;
#> padding-top: 5px;
#> padding-bottom: 6px;
#> padding-left: 5px;
#> padding-right: 5px;
#> overflow-x: hidden;
#> }
#>
#> #ticpvsghdh .gt_column_spanner_outer {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: normal;
#> text-transform: inherit;
#> padding-top: 0;
#> padding-bottom: 0;
#> padding-left: 4px;
#> padding-right: 4px;
#> }
#>
#> #ticpvsghdh .gt_column_spanner_outer:first-child {
#> padding-left: 0;
#> }
#>
#> #ticpvsghdh .gt_column_spanner_outer:last-child {
#> padding-right: 0;
#> }
#>
#> #ticpvsghdh .gt_column_spanner {
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> vertical-align: bottom;
#> padding-top: 5px;
#> padding-bottom: 5px;
#> overflow-x: hidden;
#> display: inline-block;
#> width: 100%;
#> }
#>
#> #ticpvsghdh .gt_spanner_row {
#> border-bottom-style: hidden;
#> }
#>
#> #ticpvsghdh .gt_group_heading {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> text-transform: inherit;
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> vertical-align: middle;
#> text-align: left;
#> }
#>
#> #ticpvsghdh .gt_empty_group_heading {
#> padding: 0.5px;
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> vertical-align: middle;
#> }
#>
#> #ticpvsghdh .gt_from_md > :first-child {
#> margin-top: 0;
#> }
#>
#> #ticpvsghdh .gt_from_md > :last-child {
#> margin-bottom: 0;
#> }
#>
#> #ticpvsghdh .gt_row {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> margin: 10px;
#> border-top-style: solid;
#> border-top-width: 1px;
#> border-top-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> vertical-align: middle;
#> overflow-x: hidden;
#> }
#>
#> #ticpvsghdh .gt_stub {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> text-transform: inherit;
#> border-right-style: solid;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #ticpvsghdh .gt_stub_row_group {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> text-transform: inherit;
#> border-right-style: solid;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> padding-left: 5px;
#> padding-right: 5px;
#> vertical-align: top;
#> }
#>
#> #ticpvsghdh .gt_row_group_first td {
#> border-top-width: 2px;
#> }
#>
#> #ticpvsghdh .gt_row_group_first th {
#> border-top-width: 2px;
#> }
#>
#> #ticpvsghdh .gt_summary_row {
#> color: #333333;
#> background-color: #FFFFFF;
#> text-transform: inherit;
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #ticpvsghdh .gt_first_summary_row {
#> border-top-style: solid;
#> border-top-color: #D3D3D3;
#> }
#>
#> #ticpvsghdh .gt_first_summary_row.thick {
#> border-top-width: 2px;
#> }
#>
#> #ticpvsghdh .gt_last_summary_row {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #ticpvsghdh .gt_grand_summary_row {
#> color: #333333;
#> background-color: #FFFFFF;
#> text-transform: inherit;
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #ticpvsghdh .gt_first_grand_summary_row {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-top-style: double;
#> border-top-width: 6px;
#> border-top-color: #D3D3D3;
#> }
#>
#> #ticpvsghdh .gt_last_grand_summary_row_top {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-bottom-style: double;
#> border-bottom-width: 6px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #ticpvsghdh .gt_striped {
#> background-color: rgba(128, 128, 128, 0.05);
#> }
#>
#> #ticpvsghdh .gt_table_body {
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #ticpvsghdh .gt_footnotes {
#> color: #333333;
#> background-color: #FFFFFF;
#> border-bottom-style: none;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 2px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #ticpvsghdh .gt_footnote {
#> margin: 0px;
#> font-size: 90%;
#> padding-top: 4px;
#> padding-bottom: 4px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #ticpvsghdh .gt_sourcenotes {
#> color: #333333;
#> background-color: #FFFFFF;
#> border-bottom-style: none;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 2px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #ticpvsghdh .gt_sourcenote {
#> font-size: 90%;
#> padding-top: 4px;
#> padding-bottom: 4px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #ticpvsghdh .gt_left {
#> text-align: left;
#> }
#>
#> #ticpvsghdh .gt_center {
#> text-align: center;
#> }
#>
#> #ticpvsghdh .gt_right {
#> text-align: right;
#> font-variant-numeric: tabular-nums;
#> }
#>
#> #ticpvsghdh .gt_font_normal {
#> font-weight: normal;
#> }
#>
#> #ticpvsghdh .gt_font_bold {
#> font-weight: bold;
#> }
#>
#> #ticpvsghdh .gt_font_italic {
#> font-style: italic;
#> }
#>
#> #ticpvsghdh .gt_super {
#> font-size: 65%;
#> }
#>
#> #ticpvsghdh .gt_footnote_marks {
#> font-size: 75%;
#> vertical-align: 0.4em;
#> position: initial;
#> }
#>
#> #ticpvsghdh .gt_asterisk {
#> font-size: 100%;
#> vertical-align: 0;
#> }
#>
#> #ticpvsghdh .gt_indent_1 {
#> text-indent: 5px;
#> }
#>
#> #ticpvsghdh .gt_indent_2 {
#> text-indent: 10px;
#> }
#>
#> #ticpvsghdh .gt_indent_3 {
#> text-indent: 15px;
#> }
#>
#> #ticpvsghdh .gt_indent_4 {
#> text-indent: 20px;
#> }
#>
#> #ticpvsghdh .gt_indent_5 {
#> text-indent: 25px;
#> }
#>
#> #ticpvsghdh .katex-display {
#> display: inline-flex !important;
#> margin-bottom: 0.75em !important;
#> }
#>
#> #ticpvsghdh div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
#> height: 0px !important;
#> }
#> </style>
#> <table class="gt_table" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
#> <thead>
#> <tr class="gt_col_headings">
#> <th class="gt_col_heading gt_columns_bottom_border gt_left" rowspan="1" colspan="1" scope="col" id="label"><span class='gt_from_md'><strong>Characteristic</strong></span></th>
#> <th class="gt_col_heading gt_columns_bottom_border gt_center" rowspan="1" colspan="1" scope="col" id="stat_1"><span class='gt_from_md'><strong>Drug A</strong><br />
#> N = 98</span><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>1</sup></span></th>
#> <th class="gt_col_heading gt_columns_bottom_border gt_center" rowspan="1" colspan="1" scope="col" id="stat_2"><span class='gt_from_md'><strong>Drug B</strong><br />
#> N = 102</span><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>1</sup></span></th>
#> </tr>
#> </thead>
#> <tbody class="gt_table_body">
#> <tr><td headers="label" class="gt_row gt_left"> T3</td>
#> <td headers="stat_1" class="gt_row gt_center">22 (22%)</td>
#> <td headers="stat_2" class="gt_row gt_center">21 (21%)</td></tr>
#> <tr><td headers="label" class="gt_row gt_left"> T4</td>
#> <td headers="stat_1" class="gt_row gt_center">23 (23%)</td>
#> <td headers="stat_2" class="gt_row gt_center">27 (26%)</td></tr>
#> <tr><td headers="label" class="gt_row gt_left">Grade</td>
#> <td headers="stat_1" class="gt_row gt_center"><br /></td>
#> <td headers="stat_2" class="gt_row gt_center"><br /></td></tr>
#> <tr><td headers="label" class="gt_row gt_left"> I</td>
#> <td headers="stat_1" class="gt_row gt_center">35 (36%)</td>
#> <td headers="stat_2" class="gt_row gt_center">33 (32%)</td></tr>
#> <tr><td headers="label" class="gt_row gt_left"> II</td>
#> <td headers="stat_1" class="gt_row gt_center">32 (33%)</td>
#> <td headers="stat_2" class="gt_row gt_center">36 (35%)</td></tr>
#> <tr><td headers="label" class="gt_row gt_left"> III</td>
#> <td headers="stat_1" class="gt_row gt_center">31 (32%)</td>
#> <td headers="stat_2" class="gt_row gt_center">33 (32%)</td></tr>
#> <tr><td headers="label" class="gt_row gt_left">Tumor Response</td>
#> <td headers="stat_1" class="gt_row gt_center">28 (29%)</td>
#> <td headers="stat_2" class="gt_row gt_center">33 (34%)</td></tr>
#> <tr><td headers="label" class="gt_row gt_left"> Unknown</td>
#> <td headers="stat_1" class="gt_row gt_center">3</td>
#> <td headers="stat_2" class="gt_row gt_center">4</td></tr>
#> <tr><td headers="label" class="gt_row gt_left">Patient Died</td>
#> <td headers="stat_1" class="gt_row gt_center">52 (53%)</td>
#> <td headers="stat_2" class="gt_row gt_center">60 (59%)</td></tr>
#> <tr><td headers="label" class="gt_row gt_left">Months to Death/Censor</td>
#> <td headers="stat_1" class="gt_row gt_center">23.5 (17.4, 24.0)</td>
#> <td headers="stat_2" class="gt_row gt_center">21.2 (14.5, 24.0)</td></tr>
#> </tbody>
#>
#> <tfoot class="gt_footnotes">
#> <tr>
#> <td class="gt_footnote" colspan="3"><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>1</sup></span> <span class='gt_from_md'>Median (Q1, Q3); n (%)</span></td>
#> </tr>
#> </tfoot>
#> </table>
#> </div>
#>
# Example 3 ----------------------------------
# Split by columns
trial |>
tbl_summary(by = trt, include = c(death, ttdeath)) |>
tbl_split_by_columns(groups = list("stat_1", "stat_2")) |>
tail(n = 1) # Print only last table for simplicity
#> [[1]]
#> <div id="uaqqtdwdtm" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
#> <style>#uaqqtdwdtm table {
#> font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
#> -webkit-font-smoothing: antialiased;
#> -moz-osx-font-smoothing: grayscale;
#> }
#>
#> #uaqqtdwdtm thead, #uaqqtdwdtm tbody, #uaqqtdwdtm tfoot, #uaqqtdwdtm tr, #uaqqtdwdtm td, #uaqqtdwdtm th {
#> border-style: none;
#> }
#>
#> #uaqqtdwdtm p {
#> margin: 0;
#> padding: 0;
#> }
#>
#> #uaqqtdwdtm .gt_table {
#> display: table;
#> border-collapse: collapse;
#> line-height: normal;
#> margin-left: auto;
#> margin-right: auto;
#> color: #333333;
#> font-size: 16px;
#> font-weight: normal;
#> font-style: normal;
#> background-color: #FFFFFF;
#> width: auto;
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #A8A8A8;
#> border-right-style: none;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #A8A8A8;
#> border-left-style: none;
#> border-left-width: 2px;
#> border-left-color: #D3D3D3;
#> }
#>
#> #uaqqtdwdtm .gt_caption {
#> padding-top: 4px;
#> padding-bottom: 4px;
#> }
#>
#> #uaqqtdwdtm .gt_title {
#> color: #333333;
#> font-size: 125%;
#> font-weight: initial;
#> padding-top: 4px;
#> padding-bottom: 4px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-bottom-color: #FFFFFF;
#> border-bottom-width: 0;
#> }
#>
#> #uaqqtdwdtm .gt_subtitle {
#> color: #333333;
#> font-size: 85%;
#> font-weight: initial;
#> padding-top: 3px;
#> padding-bottom: 5px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-top-color: #FFFFFF;
#> border-top-width: 0;
#> }
#>
#> #uaqqtdwdtm .gt_heading {
#> background-color: #FFFFFF;
#> text-align: center;
#> border-bottom-color: #FFFFFF;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #uaqqtdwdtm .gt_bottom_border {
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #uaqqtdwdtm .gt_col_headings {
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #uaqqtdwdtm .gt_col_heading {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: normal;
#> text-transform: inherit;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> vertical-align: bottom;
#> padding-top: 5px;
#> padding-bottom: 6px;
#> padding-left: 5px;
#> padding-right: 5px;
#> overflow-x: hidden;
#> }
#>
#> #uaqqtdwdtm .gt_column_spanner_outer {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: normal;
#> text-transform: inherit;
#> padding-top: 0;
#> padding-bottom: 0;
#> padding-left: 4px;
#> padding-right: 4px;
#> }
#>
#> #uaqqtdwdtm .gt_column_spanner_outer:first-child {
#> padding-left: 0;
#> }
#>
#> #uaqqtdwdtm .gt_column_spanner_outer:last-child {
#> padding-right: 0;
#> }
#>
#> #uaqqtdwdtm .gt_column_spanner {
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> vertical-align: bottom;
#> padding-top: 5px;
#> padding-bottom: 5px;
#> overflow-x: hidden;
#> display: inline-block;
#> width: 100%;
#> }
#>
#> #uaqqtdwdtm .gt_spanner_row {
#> border-bottom-style: hidden;
#> }
#>
#> #uaqqtdwdtm .gt_group_heading {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> text-transform: inherit;
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> vertical-align: middle;
#> text-align: left;
#> }
#>
#> #uaqqtdwdtm .gt_empty_group_heading {
#> padding: 0.5px;
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> vertical-align: middle;
#> }
#>
#> #uaqqtdwdtm .gt_from_md > :first-child {
#> margin-top: 0;
#> }
#>
#> #uaqqtdwdtm .gt_from_md > :last-child {
#> margin-bottom: 0;
#> }
#>
#> #uaqqtdwdtm .gt_row {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> margin: 10px;
#> border-top-style: solid;
#> border-top-width: 1px;
#> border-top-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> vertical-align: middle;
#> overflow-x: hidden;
#> }
#>
#> #uaqqtdwdtm .gt_stub {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> text-transform: inherit;
#> border-right-style: solid;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #uaqqtdwdtm .gt_stub_row_group {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> text-transform: inherit;
#> border-right-style: solid;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> padding-left: 5px;
#> padding-right: 5px;
#> vertical-align: top;
#> }
#>
#> #uaqqtdwdtm .gt_row_group_first td {
#> border-top-width: 2px;
#> }
#>
#> #uaqqtdwdtm .gt_row_group_first th {
#> border-top-width: 2px;
#> }
#>
#> #uaqqtdwdtm .gt_summary_row {
#> color: #333333;
#> background-color: #FFFFFF;
#> text-transform: inherit;
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #uaqqtdwdtm .gt_first_summary_row {
#> border-top-style: solid;
#> border-top-color: #D3D3D3;
#> }
#>
#> #uaqqtdwdtm .gt_first_summary_row.thick {
#> border-top-width: 2px;
#> }
#>
#> #uaqqtdwdtm .gt_last_summary_row {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #uaqqtdwdtm .gt_grand_summary_row {
#> color: #333333;
#> background-color: #FFFFFF;
#> text-transform: inherit;
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #uaqqtdwdtm .gt_first_grand_summary_row {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-top-style: double;
#> border-top-width: 6px;
#> border-top-color: #D3D3D3;
#> }
#>
#> #uaqqtdwdtm .gt_last_grand_summary_row_top {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-bottom-style: double;
#> border-bottom-width: 6px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #uaqqtdwdtm .gt_striped {
#> background-color: rgba(128, 128, 128, 0.05);
#> }
#>
#> #uaqqtdwdtm .gt_table_body {
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #uaqqtdwdtm .gt_footnotes {
#> color: #333333;
#> background-color: #FFFFFF;
#> border-bottom-style: none;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 2px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #uaqqtdwdtm .gt_footnote {
#> margin: 0px;
#> font-size: 90%;
#> padding-top: 4px;
#> padding-bottom: 4px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #uaqqtdwdtm .gt_sourcenotes {
#> color: #333333;
#> background-color: #FFFFFF;
#> border-bottom-style: none;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 2px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #uaqqtdwdtm .gt_sourcenote {
#> font-size: 90%;
#> padding-top: 4px;
#> padding-bottom: 4px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #uaqqtdwdtm .gt_left {
#> text-align: left;
#> }
#>
#> #uaqqtdwdtm .gt_center {
#> text-align: center;
#> }
#>
#> #uaqqtdwdtm .gt_right {
#> text-align: right;
#> font-variant-numeric: tabular-nums;
#> }
#>
#> #uaqqtdwdtm .gt_font_normal {
#> font-weight: normal;
#> }
#>
#> #uaqqtdwdtm .gt_font_bold {
#> font-weight: bold;
#> }
#>
#> #uaqqtdwdtm .gt_font_italic {
#> font-style: italic;
#> }
#>
#> #uaqqtdwdtm .gt_super {
#> font-size: 65%;
#> }
#>
#> #uaqqtdwdtm .gt_footnote_marks {
#> font-size: 75%;
#> vertical-align: 0.4em;
#> position: initial;
#> }
#>
#> #uaqqtdwdtm .gt_asterisk {
#> font-size: 100%;
#> vertical-align: 0;
#> }
#>
#> #uaqqtdwdtm .gt_indent_1 {
#> text-indent: 5px;
#> }
#>
#> #uaqqtdwdtm .gt_indent_2 {
#> text-indent: 10px;
#> }
#>
#> #uaqqtdwdtm .gt_indent_3 {
#> text-indent: 15px;
#> }
#>
#> #uaqqtdwdtm .gt_indent_4 {
#> text-indent: 20px;
#> }
#>
#> #uaqqtdwdtm .gt_indent_5 {
#> text-indent: 25px;
#> }
#>
#> #uaqqtdwdtm .katex-display {
#> display: inline-flex !important;
#> margin-bottom: 0.75em !important;
#> }
#>
#> #uaqqtdwdtm div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
#> height: 0px !important;
#> }
#> </style>
#> <table class="gt_table" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
#> <thead>
#> <tr class="gt_col_headings">
#> <th class="gt_col_heading gt_columns_bottom_border gt_left" rowspan="1" colspan="1" scope="col" id="label"><span class='gt_from_md'><strong>Characteristic</strong></span></th>
#> <th class="gt_col_heading gt_columns_bottom_border gt_center" rowspan="1" colspan="1" scope="col" id="stat_2"><span class='gt_from_md'><strong>Drug B</strong><br />
#> N = 102</span><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>1</sup></span></th>
#> </tr>
#> </thead>
#> <tbody class="gt_table_body">
#> <tr><td headers="label" class="gt_row gt_left">Patient Died</td>
#> <td headers="stat_2" class="gt_row gt_center">60 (59%)</td></tr>
#> <tr><td headers="label" class="gt_row gt_left">Months to Death/Censor</td>
#> <td headers="stat_2" class="gt_row gt_center">21.2 (14.5, 24.0)</td></tr>
#> </tbody>
#>
#> <tfoot class="gt_footnotes">
#> <tr>
#> <td class="gt_footnote" colspan="2"><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>1</sup></span> <span class='gt_from_md'>n (%); Median (Q1, Q3)</span></td>
#> </tr>
#> </tfoot>
#> </table>
#> </div>
#>
# Example 4 ----------------------------------
# Both row and column splitting
trial |>
tbl_summary(by = trt) |>
tbl_split_by_rows(variables = c(marker, grade)) |>
tbl_split_by_columns(groups = list("stat_1", "stat_2")) |>
tail(n = 1) # Print only last table for simplicity
#> [[1]]
#> <div id="epclwdbuuj" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
#> <style>#epclwdbuuj table {
#> font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
#> -webkit-font-smoothing: antialiased;
#> -moz-osx-font-smoothing: grayscale;
#> }
#>
#> #epclwdbuuj thead, #epclwdbuuj tbody, #epclwdbuuj tfoot, #epclwdbuuj tr, #epclwdbuuj td, #epclwdbuuj th {
#> border-style: none;
#> }
#>
#> #epclwdbuuj p {
#> margin: 0;
#> padding: 0;
#> }
#>
#> #epclwdbuuj .gt_table {
#> display: table;
#> border-collapse: collapse;
#> line-height: normal;
#> margin-left: auto;
#> margin-right: auto;
#> color: #333333;
#> font-size: 16px;
#> font-weight: normal;
#> font-style: normal;
#> background-color: #FFFFFF;
#> width: auto;
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #A8A8A8;
#> border-right-style: none;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #A8A8A8;
#> border-left-style: none;
#> border-left-width: 2px;
#> border-left-color: #D3D3D3;
#> }
#>
#> #epclwdbuuj .gt_caption {
#> padding-top: 4px;
#> padding-bottom: 4px;
#> }
#>
#> #epclwdbuuj .gt_title {
#> color: #333333;
#> font-size: 125%;
#> font-weight: initial;
#> padding-top: 4px;
#> padding-bottom: 4px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-bottom-color: #FFFFFF;
#> border-bottom-width: 0;
#> }
#>
#> #epclwdbuuj .gt_subtitle {
#> color: #333333;
#> font-size: 85%;
#> font-weight: initial;
#> padding-top: 3px;
#> padding-bottom: 5px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-top-color: #FFFFFF;
#> border-top-width: 0;
#> }
#>
#> #epclwdbuuj .gt_heading {
#> background-color: #FFFFFF;
#> text-align: center;
#> border-bottom-color: #FFFFFF;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #epclwdbuuj .gt_bottom_border {
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #epclwdbuuj .gt_col_headings {
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #epclwdbuuj .gt_col_heading {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: normal;
#> text-transform: inherit;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> vertical-align: bottom;
#> padding-top: 5px;
#> padding-bottom: 6px;
#> padding-left: 5px;
#> padding-right: 5px;
#> overflow-x: hidden;
#> }
#>
#> #epclwdbuuj .gt_column_spanner_outer {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: normal;
#> text-transform: inherit;
#> padding-top: 0;
#> padding-bottom: 0;
#> padding-left: 4px;
#> padding-right: 4px;
#> }
#>
#> #epclwdbuuj .gt_column_spanner_outer:first-child {
#> padding-left: 0;
#> }
#>
#> #epclwdbuuj .gt_column_spanner_outer:last-child {
#> padding-right: 0;
#> }
#>
#> #epclwdbuuj .gt_column_spanner {
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> vertical-align: bottom;
#> padding-top: 5px;
#> padding-bottom: 5px;
#> overflow-x: hidden;
#> display: inline-block;
#> width: 100%;
#> }
#>
#> #epclwdbuuj .gt_spanner_row {
#> border-bottom-style: hidden;
#> }
#>
#> #epclwdbuuj .gt_group_heading {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> text-transform: inherit;
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> vertical-align: middle;
#> text-align: left;
#> }
#>
#> #epclwdbuuj .gt_empty_group_heading {
#> padding: 0.5px;
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> vertical-align: middle;
#> }
#>
#> #epclwdbuuj .gt_from_md > :first-child {
#> margin-top: 0;
#> }
#>
#> #epclwdbuuj .gt_from_md > :last-child {
#> margin-bottom: 0;
#> }
#>
#> #epclwdbuuj .gt_row {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> margin: 10px;
#> border-top-style: solid;
#> border-top-width: 1px;
#> border-top-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> vertical-align: middle;
#> overflow-x: hidden;
#> }
#>
#> #epclwdbuuj .gt_stub {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> text-transform: inherit;
#> border-right-style: solid;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #epclwdbuuj .gt_stub_row_group {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> text-transform: inherit;
#> border-right-style: solid;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> padding-left: 5px;
#> padding-right: 5px;
#> vertical-align: top;
#> }
#>
#> #epclwdbuuj .gt_row_group_first td {
#> border-top-width: 2px;
#> }
#>
#> #epclwdbuuj .gt_row_group_first th {
#> border-top-width: 2px;
#> }
#>
#> #epclwdbuuj .gt_summary_row {
#> color: #333333;
#> background-color: #FFFFFF;
#> text-transform: inherit;
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #epclwdbuuj .gt_first_summary_row {
#> border-top-style: solid;
#> border-top-color: #D3D3D3;
#> }
#>
#> #epclwdbuuj .gt_first_summary_row.thick {
#> border-top-width: 2px;
#> }
#>
#> #epclwdbuuj .gt_last_summary_row {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #epclwdbuuj .gt_grand_summary_row {
#> color: #333333;
#> background-color: #FFFFFF;
#> text-transform: inherit;
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #epclwdbuuj .gt_first_grand_summary_row {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-top-style: double;
#> border-top-width: 6px;
#> border-top-color: #D3D3D3;
#> }
#>
#> #epclwdbuuj .gt_last_grand_summary_row_top {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-bottom-style: double;
#> border-bottom-width: 6px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #epclwdbuuj .gt_striped {
#> background-color: rgba(128, 128, 128, 0.05);
#> }
#>
#> #epclwdbuuj .gt_table_body {
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #epclwdbuuj .gt_footnotes {
#> color: #333333;
#> background-color: #FFFFFF;
#> border-bottom-style: none;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 2px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #epclwdbuuj .gt_footnote {
#> margin: 0px;
#> font-size: 90%;
#> padding-top: 4px;
#> padding-bottom: 4px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #epclwdbuuj .gt_sourcenotes {
#> color: #333333;
#> background-color: #FFFFFF;
#> border-bottom-style: none;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 2px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #epclwdbuuj .gt_sourcenote {
#> font-size: 90%;
#> padding-top: 4px;
#> padding-bottom: 4px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #epclwdbuuj .gt_left {
#> text-align: left;
#> }
#>
#> #epclwdbuuj .gt_center {
#> text-align: center;
#> }
#>
#> #epclwdbuuj .gt_right {
#> text-align: right;
#> font-variant-numeric: tabular-nums;
#> }
#>
#> #epclwdbuuj .gt_font_normal {
#> font-weight: normal;
#> }
#>
#> #epclwdbuuj .gt_font_bold {
#> font-weight: bold;
#> }
#>
#> #epclwdbuuj .gt_font_italic {
#> font-style: italic;
#> }
#>
#> #epclwdbuuj .gt_super {
#> font-size: 65%;
#> }
#>
#> #epclwdbuuj .gt_footnote_marks {
#> font-size: 75%;
#> vertical-align: 0.4em;
#> position: initial;
#> }
#>
#> #epclwdbuuj .gt_asterisk {
#> font-size: 100%;
#> vertical-align: 0;
#> }
#>
#> #epclwdbuuj .gt_indent_1 {
#> text-indent: 5px;
#> }
#>
#> #epclwdbuuj .gt_indent_2 {
#> text-indent: 10px;
#> }
#>
#> #epclwdbuuj .gt_indent_3 {
#> text-indent: 15px;
#> }
#>
#> #epclwdbuuj .gt_indent_4 {
#> text-indent: 20px;
#> }
#>
#> #epclwdbuuj .gt_indent_5 {
#> text-indent: 25px;
#> }
#>
#> #epclwdbuuj .katex-display {
#> display: inline-flex !important;
#> margin-bottom: 0.75em !important;
#> }
#>
#> #epclwdbuuj div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
#> height: 0px !important;
#> }
#> </style>
#> <table class="gt_table" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
#> <thead>
#> <tr class="gt_col_headings">
#> <th class="gt_col_heading gt_columns_bottom_border gt_left" rowspan="1" colspan="1" scope="col" id="label"><span class='gt_from_md'><strong>Characteristic</strong></span></th>
#> <th class="gt_col_heading gt_columns_bottom_border gt_center" rowspan="1" colspan="1" scope="col" id="stat_2"><span class='gt_from_md'><strong>Drug B</strong><br />
#> N = 102</span><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>1</sup></span></th>
#> </tr>
#> </thead>
#> <tbody class="gt_table_body">
#> <tr><td headers="label" class="gt_row gt_left">Tumor Response</td>
#> <td headers="stat_2" class="gt_row gt_center">33 (34%)</td></tr>
#> <tr><td headers="label" class="gt_row gt_left"> Unknown</td>
#> <td headers="stat_2" class="gt_row gt_center">4</td></tr>
#> <tr><td headers="label" class="gt_row gt_left">Patient Died</td>
#> <td headers="stat_2" class="gt_row gt_center">60 (59%)</td></tr>
#> <tr><td headers="label" class="gt_row gt_left">Months to Death/Censor</td>
#> <td headers="stat_2" class="gt_row gt_center">21.2 (14.5, 24.0)</td></tr>
#> </tbody>
#>
#> <tfoot class="gt_footnotes">
#> <tr>
#> <td class="gt_footnote" colspan="2"><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>1</sup></span> <span class='gt_from_md'>Median (Q1, Q3); n (%)</span></td>
#> </tr>
#> </tfoot>
#> </table>
#> </div>
#>
# Example 5 ------------------------------
# Split by rows with footnotes and caption
trial |>
tbl_summary(by = trt, missing = "no") |>
modify_footnote_header(
footnote = "All but four subjects received both treatments in a crossover design",
columns = all_stat_cols(),
replace = FALSE
) |>
modify_footnote_body(
footnote = "Tumor grade was assessed _before_ treatment began",
columns = "label",
rows = variable == "grade" & row_type == "label"
) |>
modify_spanning_header(
c(stat_1, stat_2) ~ "**TRT**"
) |>
modify_abbreviation("I = 1, II = 2, III = 3") |>
modify_caption("_Some caption_") |>
modify_footnote_spanning_header(
footnote = "Treatment",
columns = c(stat_1)
) |>
modify_source_note("Some source note!") |>
tbl_split_by_rows(variables = c(marker, stage, grade), footnotes = "last", caption = "first") |>
tail(n = 2) |>
head(n = 1) # Print only one but not last table for simplicity
#> [[1]]
#> <div id="pdhutkkvtw" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
#> <style>#pdhutkkvtw table {
#> font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
#> -webkit-font-smoothing: antialiased;
#> -moz-osx-font-smoothing: grayscale;
#> }
#>
#> #pdhutkkvtw thead, #pdhutkkvtw tbody, #pdhutkkvtw tfoot, #pdhutkkvtw tr, #pdhutkkvtw td, #pdhutkkvtw th {
#> border-style: none;
#> }
#>
#> #pdhutkkvtw p {
#> margin: 0;
#> padding: 0;
#> }
#>
#> #pdhutkkvtw .gt_table {
#> display: table;
#> border-collapse: collapse;
#> line-height: normal;
#> margin-left: auto;
#> margin-right: auto;
#> color: #333333;
#> font-size: 16px;
#> font-weight: normal;
#> font-style: normal;
#> background-color: #FFFFFF;
#> width: auto;
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #A8A8A8;
#> border-right-style: none;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #A8A8A8;
#> border-left-style: none;
#> border-left-width: 2px;
#> border-left-color: #D3D3D3;
#> }
#>
#> #pdhutkkvtw .gt_caption {
#> padding-top: 4px;
#> padding-bottom: 4px;
#> }
#>
#> #pdhutkkvtw .gt_title {
#> color: #333333;
#> font-size: 125%;
#> font-weight: initial;
#> padding-top: 4px;
#> padding-bottom: 4px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-bottom-color: #FFFFFF;
#> border-bottom-width: 0;
#> }
#>
#> #pdhutkkvtw .gt_subtitle {
#> color: #333333;
#> font-size: 85%;
#> font-weight: initial;
#> padding-top: 3px;
#> padding-bottom: 5px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-top-color: #FFFFFF;
#> border-top-width: 0;
#> }
#>
#> #pdhutkkvtw .gt_heading {
#> background-color: #FFFFFF;
#> text-align: center;
#> border-bottom-color: #FFFFFF;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #pdhutkkvtw .gt_bottom_border {
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #pdhutkkvtw .gt_col_headings {
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #pdhutkkvtw .gt_col_heading {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: normal;
#> text-transform: inherit;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> vertical-align: bottom;
#> padding-top: 5px;
#> padding-bottom: 6px;
#> padding-left: 5px;
#> padding-right: 5px;
#> overflow-x: hidden;
#> }
#>
#> #pdhutkkvtw .gt_column_spanner_outer {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: normal;
#> text-transform: inherit;
#> padding-top: 0;
#> padding-bottom: 0;
#> padding-left: 4px;
#> padding-right: 4px;
#> }
#>
#> #pdhutkkvtw .gt_column_spanner_outer:first-child {
#> padding-left: 0;
#> }
#>
#> #pdhutkkvtw .gt_column_spanner_outer:last-child {
#> padding-right: 0;
#> }
#>
#> #pdhutkkvtw .gt_column_spanner {
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> vertical-align: bottom;
#> padding-top: 5px;
#> padding-bottom: 5px;
#> overflow-x: hidden;
#> display: inline-block;
#> width: 100%;
#> }
#>
#> #pdhutkkvtw .gt_spanner_row {
#> border-bottom-style: hidden;
#> }
#>
#> #pdhutkkvtw .gt_group_heading {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> text-transform: inherit;
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> vertical-align: middle;
#> text-align: left;
#> }
#>
#> #pdhutkkvtw .gt_empty_group_heading {
#> padding: 0.5px;
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> vertical-align: middle;
#> }
#>
#> #pdhutkkvtw .gt_from_md > :first-child {
#> margin-top: 0;
#> }
#>
#> #pdhutkkvtw .gt_from_md > :last-child {
#> margin-bottom: 0;
#> }
#>
#> #pdhutkkvtw .gt_row {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> margin: 10px;
#> border-top-style: solid;
#> border-top-width: 1px;
#> border-top-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 1px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 1px;
#> border-right-color: #D3D3D3;
#> vertical-align: middle;
#> overflow-x: hidden;
#> }
#>
#> #pdhutkkvtw .gt_stub {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> text-transform: inherit;
#> border-right-style: solid;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #pdhutkkvtw .gt_stub_row_group {
#> color: #333333;
#> background-color: #FFFFFF;
#> font-size: 100%;
#> font-weight: initial;
#> text-transform: inherit;
#> border-right-style: solid;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> padding-left: 5px;
#> padding-right: 5px;
#> vertical-align: top;
#> }
#>
#> #pdhutkkvtw .gt_row_group_first td {
#> border-top-width: 2px;
#> }
#>
#> #pdhutkkvtw .gt_row_group_first th {
#> border-top-width: 2px;
#> }
#>
#> #pdhutkkvtw .gt_summary_row {
#> color: #333333;
#> background-color: #FFFFFF;
#> text-transform: inherit;
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #pdhutkkvtw .gt_first_summary_row {
#> border-top-style: solid;
#> border-top-color: #D3D3D3;
#> }
#>
#> #pdhutkkvtw .gt_first_summary_row.thick {
#> border-top-width: 2px;
#> }
#>
#> #pdhutkkvtw .gt_last_summary_row {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #pdhutkkvtw .gt_grand_summary_row {
#> color: #333333;
#> background-color: #FFFFFF;
#> text-transform: inherit;
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #pdhutkkvtw .gt_first_grand_summary_row {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-top-style: double;
#> border-top-width: 6px;
#> border-top-color: #D3D3D3;
#> }
#>
#> #pdhutkkvtw .gt_last_grand_summary_row_top {
#> padding-top: 8px;
#> padding-bottom: 8px;
#> padding-left: 5px;
#> padding-right: 5px;
#> border-bottom-style: double;
#> border-bottom-width: 6px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #pdhutkkvtw .gt_striped {
#> background-color: rgba(128, 128, 128, 0.05);
#> }
#>
#> #pdhutkkvtw .gt_table_body {
#> border-top-style: solid;
#> border-top-width: 2px;
#> border-top-color: #D3D3D3;
#> border-bottom-style: solid;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> }
#>
#> #pdhutkkvtw .gt_footnotes {
#> color: #333333;
#> background-color: #FFFFFF;
#> border-bottom-style: none;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 2px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #pdhutkkvtw .gt_footnote {
#> margin: 0px;
#> font-size: 90%;
#> padding-top: 4px;
#> padding-bottom: 4px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #pdhutkkvtw .gt_sourcenotes {
#> color: #333333;
#> background-color: #FFFFFF;
#> border-bottom-style: none;
#> border-bottom-width: 2px;
#> border-bottom-color: #D3D3D3;
#> border-left-style: none;
#> border-left-width: 2px;
#> border-left-color: #D3D3D3;
#> border-right-style: none;
#> border-right-width: 2px;
#> border-right-color: #D3D3D3;
#> }
#>
#> #pdhutkkvtw .gt_sourcenote {
#> font-size: 90%;
#> padding-top: 4px;
#> padding-bottom: 4px;
#> padding-left: 5px;
#> padding-right: 5px;
#> }
#>
#> #pdhutkkvtw .gt_left {
#> text-align: left;
#> }
#>
#> #pdhutkkvtw .gt_center {
#> text-align: center;
#> }
#>
#> #pdhutkkvtw .gt_right {
#> text-align: right;
#> font-variant-numeric: tabular-nums;
#> }
#>
#> #pdhutkkvtw .gt_font_normal {
#> font-weight: normal;
#> }
#>
#> #pdhutkkvtw .gt_font_bold {
#> font-weight: bold;
#> }
#>
#> #pdhutkkvtw .gt_font_italic {
#> font-style: italic;
#> }
#>
#> #pdhutkkvtw .gt_super {
#> font-size: 65%;
#> }
#>
#> #pdhutkkvtw .gt_footnote_marks {
#> font-size: 75%;
#> vertical-align: 0.4em;
#> position: initial;
#> }
#>
#> #pdhutkkvtw .gt_asterisk {
#> font-size: 100%;
#> vertical-align: 0;
#> }
#>
#> #pdhutkkvtw .gt_indent_1 {
#> text-indent: 5px;
#> }
#>
#> #pdhutkkvtw .gt_indent_2 {
#> text-indent: 10px;
#> }
#>
#> #pdhutkkvtw .gt_indent_3 {
#> text-indent: 15px;
#> }
#>
#> #pdhutkkvtw .gt_indent_4 {
#> text-indent: 20px;
#> }
#>
#> #pdhutkkvtw .gt_indent_5 {
#> text-indent: 25px;
#> }
#>
#> #pdhutkkvtw .katex-display {
#> display: inline-flex !important;
#> margin-bottom: 0.75em !important;
#> }
#>
#> #pdhutkkvtw div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
#> height: 0px !important;
#> }
#> </style>
#> <table class="gt_table" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
#> <thead>
#> <tr class="gt_col_headings gt_spanner_row">
#> <th class="gt_col_heading gt_columns_bottom_border gt_left" rowspan="2" colspan="1" scope="col" id="label"><span class='gt_from_md'><strong>Characteristic</strong></span></th>
#> <th class="gt_center gt_columns_top_border gt_column_spanner_outer" rowspan="1" colspan="2" scope="colgroup" id="level 1; stat_1">
#> <div class="gt_column_spanner"><span class='gt_from_md'><strong>TRT</strong></span><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>1</sup></span></div>
#> </th>
#> </tr>
#> <tr class="gt_col_headings">
#> <th class="gt_col_heading gt_columns_bottom_border gt_center" rowspan="1" colspan="1" scope="col" id="stat_1"><span class='gt_from_md'><strong>Drug A</strong><br />
#> N = 98</span><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>2,3</sup></span></th>
#> <th class="gt_col_heading gt_columns_bottom_border gt_center" rowspan="1" colspan="1" scope="col" id="stat_2"><span class='gt_from_md'><strong>Drug B</strong><br />
#> N = 102</span><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>2,3</sup></span></th>
#> </tr>
#> </thead>
#> <tbody class="gt_table_body">
#> <tr><td headers="label" class="gt_row gt_left">Grade<span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>4</sup></span></td>
#> <td headers="stat_1" class="gt_row gt_center"><br /></td>
#> <td headers="stat_2" class="gt_row gt_center"><br /></td></tr>
#> <tr><td headers="label" class="gt_row gt_left"> I</td>
#> <td headers="stat_1" class="gt_row gt_center">35 (36%)</td>
#> <td headers="stat_2" class="gt_row gt_center">33 (32%)</td></tr>
#> <tr><td headers="label" class="gt_row gt_left"> II</td>
#> <td headers="stat_1" class="gt_row gt_center">32 (33%)</td>
#> <td headers="stat_2" class="gt_row gt_center">36 (35%)</td></tr>
#> <tr><td headers="label" class="gt_row gt_left"> III</td>
#> <td headers="stat_1" class="gt_row gt_center">31 (32%)</td>
#> <td headers="stat_2" class="gt_row gt_center">33 (32%)</td></tr>
#> </tbody>
#>
#> <tfoot class="gt_footnotes">
#> <tr>
#> <td class="gt_footnote" colspan="3"><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>1</sup></span> <span class='gt_from_md'>Treatment</span></td>
#> </tr>
#> <tr>
#> <td class="gt_footnote" colspan="3"><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>2</sup></span> <span class='gt_from_md'>Median (Q1, Q3); n (%)</span></td>
#> </tr>
#> <tr>
#> <td class="gt_footnote" colspan="3"><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>3</sup></span> <span class='gt_from_md'>All but four subjects received both treatments in a crossover design</span></td>
#> </tr>
#> <tr>
#> <td class="gt_footnote" colspan="3"><span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;line-height:0;"><sup>4</sup></span> <span class='gt_from_md'>Tumor grade was assessed <em>before</em> treatment began</span></td>
#> </tr>
#> </tfoot>
#> </table>
#> </div>
#>