library(gtsummary)
<- gtsummary::tbl_summary(gtsummary::trial, by = trt, include = c(age, grade), missing = "always", label = list(age = "Age")) |> add_overall()
tbl
<- tbl$table_body |>
gt_table ::gt(caption = gt::md("This is the caption")) |>
gt#source notes
::tab_source_note("This is Source Note 1") |>
gt::tab_source_note("This is Source Note 2") |>
gt::tab_source_note("Abbreviations: Q1 = First Quartile; Q3 = Third Quartile") gt
Source Notes
Testing Source Note output
gt_save PDF
::gtsave(gt_table, filename = "outputs/pdf/source_notes_gt_pdf.pdf") gt
rmarkdown rendered PDF
gt_table
gt_save rendered word file
::gtsave(gt_table, filename = "outputs/docx/source_notes_gt_word.docx") gt
quarto rendered word file
gt_table
rmarkdown rendered word file
gt_table